Discrepancy in the number of tests runs

Bug #824388 reported by Lars Butler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
Medium
Lars Butler

Bug Description

There appears to be a discrepancy in the number of tests run, depending on how you run the tests.

Tested with this commit: https://github.com/gem/openquake/commit/d85f06bae4b22bea99633a85dbe53c1d1aa63903

python run_tests.py: 371
nosetests db_tests/*_unittest.py: 56
total: 427

python run_tests.py --all_tests: 412
total: 412

Tags: devop testing
Revision history for this message
Lars Butler (lars-butler) wrote :

Can anyone else confirm this?

Revision history for this message
Mattia Barbon (mattia.barbon) wrote :

I suppose it's because all_tests runs tests/*_unittest.py (which misses tests/risk_tests.py; bad me! no cookie!) and plain run_tests.py does not run hazard_classical_unittest (and maybe some others).

Revision history for this message
Lars Butler (lars-butler) wrote :

That's okay, I don't have any cookies anyway. =) No, it's not your fault. I think we've just been using nosetests in an unintended fashion. For instance, we're using 'nosetests db_tests/*_unittest.py' to try and run all the unit tests in this dir. What we _should_ be doing is running 'nosetests --where=db_tests/'. This requires, however, that the db_tests/__init__.py properly imports all of the test modules.

Changed in openquake:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Lars Butler (lars-butler)
milestone: none → 0.4.3
Revision history for this message
Lars Butler (lars-butler) wrote :
Changed in openquake:
status: In Progress → Fix Committed
tags: added: devop
tags: added: testing
Changed in openquake:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.