[pypy-svn] pypy default: Fix the test: cannot use .inlinetime here, because it does not

arigo commits-noreply at bitbucket.org
Tue Apr 26 11:51:09 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r43621:418448352bd6
Date: 2011-04-26 11:50 +0200
http://bitbucket.org/pypy/pypy/changeset/418448352bd6/

Log:	Fix the test: cannot use .inlinetime here, because it does not
	include the time spent doing the call to time.time(). Anyway the
	purpose of the test is to check that the result is correctly scaled,
	for which checking just .totaltime is fine.

diff --git a/pypy/module/_lsprof/test/test_cprofile.py b/pypy/module/_lsprof/test/test_cprofile.py
--- a/pypy/module/_lsprof/test/test_cprofile.py
+++ b/pypy/module/_lsprof/test/test_cprofile.py
@@ -110,10 +110,12 @@
         efoo = entries[foo.func_code]
         ebar = entries[bar.func_code]
         assert 0.9 < efoo.totaltime < 2.9
-        assert 0.9 < efoo.inlinetime < 2.9
+        # --- cannot test .inlinetime, because it does not include
+        # --- the time spent doing the call to time.time()
+        #assert 0.9 < efoo.inlinetime < 2.9
         for subentry in ebar.calls:
             assert 0.9 < subentry.totaltime < 2.9
-            assert 0.9 < subentry.inlinetime < 2.9
+            #assert 0.9 < subentry.inlinetime < 2.9
 
     def test_cprofile(self):
         import sys, os


More information about the Pypy-commit mailing list