~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_import_tariff.py

Merge bzr.dev into cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    """
37
37
 
38
38
    def run_command_check_imports(self, args, forbidden_imports):
 
39
        """Run bzr ARGS in a subprocess and check its imports.
 
40
 
 
41
        This is fairly expensive because we start a subprocess, so we aim to
 
42
        cover representative rather than exhaustive cases.
 
43
 
 
44
        :param forbidden_imports: List of fully-qualified Python module names
 
45
            that should not be loaded while running this command.
 
46
        """
39
47
        # We use PYTHON_VERBOSE rather than --profile-importts because in
40
48
        # experimentation the profile-imports output seems to not always show
41
49
        # the modules you'd expect; this can be debugged but python -v seems
82
90
        # 'st' in a working tree shouldn't need many modules
83
91
        self.make_branch_and_tree('.')
84
92
        self.run_command_check_imports(['st'], [
 
93
            'bzrlib.bundle.commands',
85
94
            'bzrlib.remote',
86
95
            'bzrlib.smart',
87
96
            'smtplib',