Skip to content

Commit 0695711

Browse files
committed
fix(controller/tests): run coverage with "--timid" flag
Running controller tests through the venerable coverage.py tool raises some errors during cleanup, as we seem to have dangling PostgreSQL sessions. Adding the "--timid" flag works around this. Fixes #727.
1 parent e08de54 commit 0695711

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

controller/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ db:
4141
python manage.py syncdb --migrate --noinput
4242

4343
coverage:
44-
coverage run manage.py test --noinput api web
44+
coverage run --timid manage.py test --noinput api web
4545
coverage html
4646

4747
flake8:

docs/contributing/localdev.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,14 @@ that test coverage has improved as a result of your changes and new unit tests.
213213
make: *** [flake8] Error 1
214214
$
215215
$ make coverage
216-
coverage run manage.py test api celerytasks client web
216+
coverage run --timid manage.py test --noinput api web
217+
WARNING Cannot synchronize with etcd cluster
217218
Creating test database for alias 'default'...
218-
...................ss
219+
...............................................
219220
----------------------------------------------------------------------
220-
Ran 21 tests in 18.135s
221+
Ran 47 tests in 47.768s
221222
222-
OK (skipped=2)
223+
OK
223224
Destroying test database for alias 'default'...
224225
coverage html
225226
$ head -n 25 htmlcov/index.html | grep pc_cov

docs/contributing/standards.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ ensure that everything passes and that code coverage has not declined.
6565
.. code-block:: console
6666
6767
$ make -C controller coverage
68-
coverage run manage.py test --noinput api cm provider web
68+
coverage run --timid manage.py test --noinput api web
6969
WARNING Cannot synchronize with etcd cluster
7070
Creating test database for alias 'default'...
71-
....................................................................
71+
...............................................
7272
----------------------------------------------------------------------
73-
Ran 68 tests in 84.856s
73+
Ran 47 tests in 47.768s
7474
7575
OK
7676
Destroying test database for alias 'default'...

0 commit comments

Comments
 (0)