Bazaar Version Control System

TestLoader in Python 2.7 expects load_tests with incompatible signature

Reported by Martin Packman on 2010-07-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
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):
            ...

AARGGGGH

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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers