diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-10-06 22:05:00 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-10-06 22:05:00 (GMT) |
commit | 7d7665384c7276e87570fcbf2b61e97d9ab2db5b (patch) | |
tree | 93adeb0635ab14e0e1f2c196ba73cb8fabd8cd64 /Lib/test/test_cprofile.py | |
parent | 4e299c709be166d76dfcaa0fafefa5f6375a94bf (diff) | |
download | cpython-7d7665384c7276e87570fcbf2b61e97d9ab2db5b.zip cpython-7d7665384c7276e87570fcbf2b61e97d9ab2db5b.tar.gz cpython-7d7665384c7276e87570fcbf2b61e97d9ab2db5b.tar.bz2 |
a trival fix to let test_profile pass if it runs after test_cprofile
Diffstat (limited to 'Lib/test/test_cprofile.py')
-rw-r--r-- | Lib/test/test_cprofile.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_cprofile.py b/Lib/test/test_cprofile.py index 4c0f363..4c194dc 100644 --- a/Lib/test/test_cprofile.py +++ b/Lib/test/test_cprofile.py @@ -10,6 +10,9 @@ from test.test_profile import ProfileTest, regenerate_expected_output class CProfileTest(ProfileTest): profilerclass = cProfile.Profile + def get_expected_output(self): + return _ProfileOutput + def test_main(): run_unittest(CProfileTest) @@ -23,7 +26,8 @@ def main(): # Don't remove this comment. Everything below it is auto-generated. #--cut-------------------------------------------------------------------------- -CProfileTest.expected_output['print_stats'] = """\ +_ProfileOutput = {} +_ProfileOutput['print_stats'] = """\ 28 0.028 0.001 0.028 0.001 profilee.py:110(__getattr__) 1 0.270 0.270 1.000 1.000 profilee.py:25(testfunc) 23/3 0.150 0.007 0.170 0.057 profilee.py:35(factorial) @@ -33,7 +37,7 @@ CProfileTest.expected_output['print_stats'] = """\ 2 0.000 0.000 0.140 0.070 profilee.py:84(helper2_indirect) 8 0.312 0.039 0.400 0.050 profilee.py:88(helper2) 8 0.064 0.008 0.080 0.010 profilee.py:98(subhelper)""" -CProfileTest.expected_output['print_callers'] = """\ +_ProfileOutput['print_callers'] = """\ profilee.py:110(__getattr__) <- 16 0.016 0.016 profilee.py:98(subhelper) profilee.py:25(testfunc) <- 1 0.270 1.000 <string>:1(<module>) profilee.py:35(factorial) <- 1 0.014 0.130 profilee.py:25(testfunc) @@ -50,7 +54,7 @@ profilee.py:98(subhelper) <- 8 0.064 0.080 {built-in method hasattr} <- 4 0.000 0.004 profilee.py:73(helper1) 8 0.000 0.008 profilee.py:88(helper2) {method 'append' of 'list' objects} <- 4 0.000 0.000 profilee.py:73(helper1)""" -CProfileTest.expected_output['print_callees'] = """\ +_ProfileOutput['print_callees'] = """\ <string>:1(<module>) -> 1 0.270 1.000 profilee.py:25(testfunc) profilee.py:110(__getattr__) -> profilee.py:25(testfunc) -> 1 0.014 0.130 profilee.py:35(factorial) |