~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lsprof.py

  • Committer: Vincent Ladeuil
  • Date: 2011-11-24 15:48:29 UTC
  • mfrom: (6289 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6337.
  • Revision ID: v.ladeuil+lp@free.fr-20111124154829-avowjpsxdl8yp2vz
merge trunk resolving conflicts

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()