~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-17 09:12:11 UTC
  • mfrom: (5430.1.2 merge-2.2-into-devel)
  • Revision ID: pqm@pqm.ubuntu.com-20100917091211-1e9h9nf6bsdjr6bd
(spiv) Merge lp:bzr/2.2, including fixes for #625574, #636930,
        #254278.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4016
4016
    """
4017
4017
    new_test = copy.copy(test)
4018
4018
    new_test.id = lambda: new_id
 
4019
    # XXX: Workaround <https://bugs.launchpad.net/testtools/+bug/637725>, which
 
4020
    # causes cloned tests to share the 'details' dict.  This makes it hard to
 
4021
    # read the test output for parameterized tests, because tracebacks will be
 
4022
    # associated with irrelevant tests.
 
4023
    try:
 
4024
        details = new_test._TestCase__details
 
4025
    except AttributeError:
 
4026
        # must be a different version of testtools than expected.  Do nothing.
 
4027
        pass
 
4028
    else:
 
4029
        # Reset the '__details' dict.
 
4030
        new_test._TestCase__details = {}
4019
4031
    return new_test
4020
4032
 
4021
4033