~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_version_info.py

  • Committer: Vincent Ladeuil
  • Date: 2010-01-25 17:48:22 UTC
  • mto: (4987.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4988.
  • Revision ID: v.ladeuil+lp@free.fr-20100125174822-nce4l19sbwx83jvq
Deploying the new overrideAttr facility further reduces the complexity
and make the code clearer.

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.addAttrCleanup(registry, '_default_key')
330
 
        self._default_key = registry._default_key
331
 
        self.addAttrCleanup(registry, '_dict')
332
 
        self._dict = registry._dict.copy()
333
 
        self.addAttrCleanup(registry, '_help_dict')
334
 
        self._help_dict = registry._help_dict.copy()
335
 
        self.addAttrCleanup(registry, '_info_dict')
336
 
        self._info_dict = registry._info_dict.copy()
 
329
        self.overrideAttr(version_info_formats,
 
330
                          'format_registry', registry.Registry())
337
331
 
338
332
    def test_register_remove(self):
339
333
        registry = version_info_formats.format_registry