[Scipy-svn] r3728 - branches/testing_cleanup/scipy/sandbox/exmplpackage/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu Dec 27 02:58:58 EST 2007
Author: fperez
Date: 2007-12-27 01:58:54 -0600 (Thu, 27 Dec 2007)
New Revision: 3728
Modified:
branches/testing_cleanup/scipy/sandbox/exmplpackage/tests/ntest.py
branches/testing_cleanup/scipy/sandbox/exmplpackage/tests/test_foo.py
Log:
Further cleanup...
Modified: branches/testing_cleanup/scipy/sandbox/exmplpackage/tests/ntest.py
===================================================================
--- branches/testing_cleanup/scipy/sandbox/exmplpackage/tests/ntest.py 2007-12-27 07:56:42 UTC (rev 3727)
+++ branches/testing_cleanup/scipy/sandbox/exmplpackage/tests/ntest.py 2007-12-27 07:58:54 UTC (rev 3728)
@@ -10,7 +10,7 @@
""" Return elapsed time for executing code_str in the
namespace of the caller for given times.
"""
- frame = sys.get_frame(1)
+ frame = sys._get_frame(1)
locs,globs = frame.f_locals,frame.f_globals
code = compile(code_str,
Modified: branches/testing_cleanup/scipy/sandbox/exmplpackage/tests/test_foo.py
===================================================================
--- branches/testing_cleanup/scipy/sandbox/exmplpackage/tests/test_foo.py 2007-12-27 07:56:42 UTC (rev 3727)
+++ branches/testing_cleanup/scipy/sandbox/exmplpackage/tests/test_foo.py 2007-12-27 07:58:54 UTC (rev 3728)
@@ -88,3 +88,9 @@
"A difficult test that takes a long time..."
print '*** nasty slow test ***'
+
+
+def test_time():
+ "A simple test that times things"
+ x = 1
+ measure("x+1",'test_time')
More information about the Scipy-svn
mailing list