~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lsprof.py

  • Committer: Martin Pool
  • Date: 2011-06-14 01:26:41 UTC
  • mto: (6034.2.1 integration)
  • mto: This revision was merged to the branch mainline in revision 6043.
  • Revision ID: mbp@canonical.com-20110614012641-dnb69zb57ae5je4w
Move all test features into bzrlib.tests.features

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import bzrlib
24
24
from bzrlib import errors, tests
25
 
 
26
 
 
27
 
class _LSProfFeature(tests.Feature):
28
 
 
29
 
    def available(self):
30
 
        try:
31
 
            from bzrlib import lsprof
32
 
        except ImportError:
33
 
            return False
34
 
        else:
35
 
            return True
36
 
 
37
 
 
38
 
LSProfFeature = _LSProfFeature()
 
25
from bzrlib.tests import (
 
26
    features,
 
27
    )
39
28
 
40
29
 
41
30
_TXT_HEADER = "   CallCount    Recursive    Total(ms)   " + \
56
45
 
57
46
class TestStatsSave(tests.TestCaseInTempDir):
58
47
 
59
 
    _test_needs_features = [LSProfFeature]
 
48
    _test_needs_features = [features.lsprof_feature]
60
49
 
61
50
    def setUp(self):
62
51
        super(tests.TestCaseInTempDir, self).setUp()
96
85
 
97
86
class TestBzrProfiler(tests.TestCase):
98
87
 
99
 
    _test_needs_features = [LSProfFeature]
 
88
    _test_needs_features = [features.lsprof_feature]
100
89
 
101
90
    def test_start_call_stuff_stop(self):
102
91
        profiler = bzrlib.lsprof.BzrProfiler()