~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_import_tariff.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-06 12:52:09 UTC
  • mfrom: (5956.1.2 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20110606125209-j8r8jiltfjypii3i
(jelmer) Split out ImportTariffTestCase so it can be used by plugins.
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    ]
54
54
 
55
55
 
56
 
class TestImportTariffs(TestCaseWithTransport):
 
56
class ImportTariffTestCase(TestCaseWithTransport):
57
57
    """Check how many modules are loaded for some representative scenarios.
58
58
 
59
59
    See the Testing Guide in the developer documentation for more explanation.
72
72
        for name in ('BZR_PLUGIN_PATH', 'BZR_DISABLE_PLUGINS', 'BZR_PLUGINS_AT'
73
73
                     ):
74
74
            self.preserved_env_vars[name] = os.environ.get(name)
75
 
        super(TestImportTariffs, self).setUp()
 
75
        super(ImportTariffTestCase, self).setUp()
76
76
 
77
77
    def start_bzr_subprocess_with_import_check(self, args, stderr_file=None):
78
78
        """Run a bzr process and capture the imports.
141
141
        self.finish_bzr_subprocess_with_import_check(process, args,
142
142
            forbidden_imports)
143
143
 
 
144
 
 
145
class TestImportTariffs(ImportTariffTestCase):
 
146
    """Basic import tariff tests for some common bzr commands"""
 
147
 
144
148
    def test_import_tariffs_working(self):
145
149
        # check some guaranteed-true and false imports to be sure we're
146
150
        # measuring correctly