~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_version_info.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
from bzrlib import (
25
25
    errors,
 
26
    registry,
26
27
    symbol_versioning,
27
28
    tests,
28
29
    version_info_formats,
325
326
 
326
327
    def setUp(self):
327
328
        super(TestVersionInfoFormatRegistry, self).setUp()
328
 
        registry = version_info_formats.format_registry
329
 
        self._default_key = registry._default_key
330
 
        self._dict = registry._dict.copy()
331
 
        self._help_dict = registry._help_dict.copy()
332
 
        self._info_dict = registry._info_dict.copy()
333
 
        self.addCleanup(self._cleanup)
334
 
 
335
 
    def _cleanup(self):
336
 
        # Restore the registry to pristine state after the test runs
337
 
        registry = version_info_formats.format_registry
338
 
        registry._default_key = self._default_key
339
 
        registry._dict = self._dict
340
 
        registry._help_dict = self._help_dict
341
 
        registry._info_dict = self._info_dict
 
329
        self.overrideAttr(version_info_formats,
 
330
                          'format_registry', registry.Registry())
342
331
 
343
332
    def test_register_remove(self):
344
333
        registry = version_info_formats.format_registry