~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lsprof.py

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

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