forked from ishiland/python-geosupport
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtasks.py
More file actions
21 lines (18 loc) · 691 Bytes
/
tasks.py
File metadata and controls
21 lines (18 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from invoke import task, run
nosetests = 'nosetests --with-coverage --cover-package=geosupport --cover-html --cover-branches --cover-erase'
@task
def test(context, test_type):
if test_type == 'unit':
cmd = ' '.join([nosetests, 'tests/unit/*'])
run('sh -c "%s"' % cmd)
elif test_type == 'functional':
cmd = ' '.join([nosetests, 'tests/functional/*'])
run('sh -c "%s"' % cmd)
elif test_type == 'all':
cmd = ' '.join([nosetests, 'tests/*'])
run('sh -c "%s"' % cmd)
else:
print("Unknown test suite '%s'. Choose one of: unit, functional, all." % test_type)
@task
def pylint(context):
run('sh -c "pylint geosupport"')