~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: 2011-08-09 12:34:00 UTC
  • mfrom: (6056.2.5 option-registry)
  • Revision ID: pqm@pqm.ubuntu.com-20110809123400-x521f2j9jkxx8ze2
(vila) Introduce OptionRegistry (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
384
384
        getDetails = getattr(test, "getDetails", None)
385
385
        if getDetails is not None:
386
386
            getDetails().clear()
387
 
        # Clear _type_equality_funcs to try to stop TestCase instances
388
 
        # from wasting memory. 'clear' is not available in all Python
389
 
        # versions (bug 809048)
390
387
        type_equality_funcs = getattr(test, "_type_equality_funcs", None)
391
388
        if type_equality_funcs is not None:
392
 
            tef_clear = getattr(type_equality_funcs, "clear", None)
393
 
            if tef_clear is None:
394
 
                tef_instance_dict = getattr(type_equality_funcs, "__dict__", None)
395
 
                if tef_instance_dict is not None:
396
 
                    tef_clear = tef_instance_dict.clear
397
 
            if tef_clear is not None:
398
 
                tef_clear()
 
389
            type_equality_funcs.clear()
399
390
        self._traceback_from_test = None
400
391
 
401
392
    def startTests(self):