TestLoader in Python 2.7 expects load_tests with incompatible signature

Bug #607412 reported by Martin Packman on 2010-07-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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:

        def load_tests(loader, tests, pattern):


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

Martin Packman (gz) on 2010-07-19
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
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) on 2010-12-30
tags: added: python27
removed: python2.7
Jelmer Vernooij (jelmer) on 2017-11-09
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers