TestLoader in Python 2.7 expects load_tests with incompatible signature

Bug #607412 reported by Martin Packman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

In bzrlib.selftest.TestUtil unittest is extended to look for a `load_tests` function on test modules, documented as:

    load_tests should be defined like so:
    >>> def load_tests(standard_tests, module, loader):
    >>> pass

The Python 2.7 unittest includes a similar addition, that unfortunately has a different and incompatible signature:

    <http://docs.python.org/library/unittest.html#load-tests-protocol>
        def load_tests(loader, tests, pattern):
            ...

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 607412] [NEW] TestLoader in Python 2.7 expects load_tests with incompatible signature

AARGGGGH

I didn't realise he messed up the protocol. Sigh. /cry

Martin Packman (gz)
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Robert Collins (lifeless) wrote :

Actually, I think I did know, but I had just forgotten, and messed up was way too strong - it is different, but justifiably so.

Martin Packman (gz)
tags: added: python27
removed: python2.7
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.