~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: 2008-10-01 12:31:03 UTC
  • mfrom: (3731.3.5 allow_debug_fixes)
  • Revision ID: pqm@pqm.ubuntu.com-20081001123103-9powbklax4nmw09j
Fix the test suite when run with -Eallow_debug. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
793
793
        Tests that want to use debug flags can just set them in the
794
794
        debug_flags set during setup/teardown.
795
795
        """
 
796
        self._preserved_debug_flags = set(debug.debug_flags)
796
797
        if 'allow_debug' not in selftest_debug_flags:
797
 
            self._preserved_debug_flags = set(debug.debug_flags)
798
798
            debug.debug_flags.clear()
799
 
            self.addCleanup(self._restore_debug_flags)
 
799
        self.addCleanup(self._restore_debug_flags)
800
800
 
801
801
    def _clear_hooks(self):
802
802
        # prevent hooks affecting tests