/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-06 02:27:26 UTC
  • mto: (1946.2.6 reduce-knit-churn)
  • mto: This revision was merged to the branch mainline in revision 1842.
  • Revision ID: john@arbash-meinel.com-20060706022726-769792485a0b6890
Cleanup the imports in bzrlib.benchmark

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Benchmark test suite for bzr."""
19
19
 
20
 
import bzrlib
21
 
from bzrlib.bzrdir import BzrDir
22
 
import bzrlib.plugin
 
20
from bzrlib import bzrdir, plugin
23
21
from bzrlib.tests.TestUtil import TestLoader
24
22
from bzrlib.tests.blackbox import ExternalBase
25
23
 
37
35
        # we simulate this by three levels of dirs named 0-7, givin 512 dirs,
38
36
        # and 20 files each.
39
37
        if url is not None:
40
 
            b = bzrlib.bzrdir.BzrDir.create_branch_convenience(url)
41
 
            d = bzrlib.bzrdir.BzrDir.create('.')
 
38
            b = bzrdir.BzrDir.create_branch_convenience(url)
 
39
            d = bzrdir.BzrDir.create('.')
42
40
            bzrlib.branch.BranchReferenceFormat().initialize(d, b)
43
41
            d.create_workingtree()
44
42
        else:
123
121
    suite = TestLoader().loadTestsFromModuleNames(testmod_names) 
124
122
 
125
123
    # Load any benchmarks from plugins
126
 
    for name, plugin in bzrlib.plugin.all_plugins().items():
127
 
        if getattr(plugin, 'bench_suite', None) is not None:
128
 
            suite.addTest(plugin.bench_suite())
 
124
    for name, module in plugin.all_plugins().items():
 
125
        if getattr(module, 'bench_suite', None) is not None:
 
126
            suite.addTest(module.bench_suite())
129
127
 
130
128
    return suite