'setup.py test' doesn't run all tests.

Bug #911399 reported by Mark Sapiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
flufl.bounce
Fix Released
High
Barry Warsaw

Bug Description

In my environment, Cygwin, Python 2.6.5, distribute 0.6.14, running 'python setup.py test' does not run the tests generated by flufl.bounce._detectors.tests.detectors.make_test_cases(). I am not up to speed with setuptools/distribute, but it appears that the reason for this is that the flufl.bounce.tests.test_detectors.additional_tests() function is not recognized/called.

I have fixed this for my environment at least at <http://bazaar.launchpad.net/~msapiro/flufl.bounce/updates/revision/23>.

I have not created a merge proposal for this change because rev. 22 has not yet been merged into the trunk, and I'm afraid this proposal would muddy the waters by including those changes.

Revision history for this message
Mark Sapiro (msapiro) wrote :
Revision history for this message
Mark Sapiro (msapiro) wrote :

I wrote "... it appears that the reason for this is that the flufl.bounce.tests.test_detectors.additional_tests() function is not recognized/called."

I meant "... it appears that the reason for this is that the flufl.bounce.tests.test_detectors.load_tests() function is not recognized/called."

The fix changes load_tests() to "additional_tests()" and removes OtherBounceTests from that function as they are run anyway.

Barry Warsaw (barry)
Changed in flufl.bounce:
assignee: nobody → Barry Warsaw (barry)
importance: Undecided → High
milestone: none → 2.0
Revision history for this message
Barry Warsaw (barry) wrote :

additional_tests() is an interface to the setuptools.py test runner. load_tests() is an interface to `python -m unittest discover`. You'd think a simple load_tests() definition like this would be helpful:

def load_tests(loader, tests, pattern):
    """For `python -m unittest discover`."""
    return additional_tests()

However there appears to be some inconsistencies in how this works between Python 2.6, 2.7 and possibly 3.2. I'm still working it out and will post to the TIP list when I figure out what's going on ;). I'll commit an appropriate fix to flufl.bounce when I know what to do. ;)

Barry Warsaw (barry)
Changed in flufl.bounce:
status: New → Fix Committed
Barry Warsaw (barry)
Changed in flufl.bounce:
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.