~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2010-08-28 15:34:24 UTC
  • mto: (5398.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5399.
  • Revision ID: v.ladeuil+lp@free.fr-20100828153424-yybmcql9o0t43m7a
Fix bug #625686 by removing the warning filter added by selftest.

* bzrlib/symbol_versioning.py:
(suppress_deprecation_warnings, activate_deprecation_warnings):
Always return a cleanup callable even if no filter is installed.

* bzrlib/versionedfile.py:
Drive-by cleanup, the module is not needed.

* bzrlib/builtins.py:
(cmd_selftest.run): Ensure we restore the right warning filters.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3572
3572
            parallel=None, lsprof_tests=False):
3573
3573
        from bzrlib.tests import selftest
3574
3574
 
3575
 
        # Make deprecation warnings visible, unless -Werror is set
3576
 
        symbol_versioning.activate_deprecation_warnings(override=False)
3577
 
 
3578
3575
        if testspecs_list is not None:
3579
3576
            pattern = '|'.join(testspecs_list)
3580
3577
        else:
3620
3617
                          "starting_with": starting_with
3621
3618
                          }
3622
3619
        selftest_kwargs.update(self.additional_selftest_args)
3623
 
        result = selftest(**selftest_kwargs)
 
3620
 
 
3621
        # Make deprecation warnings visible, unless -Werror is set
 
3622
        cleanup = symbol_versioning.activate_deprecation_warnings(
 
3623
            override=False)
 
3624
        try:
 
3625
            result = selftest(**selftest_kwargs)
 
3626
        finally:
 
3627
            cleanup()
3624
3628
        return int(not result)
3625
3629
 
3626
3630