]> granicus.if.org Git - python/commitdiff
Renamed test_hashlib_speed.py to time_hashlib.py.
authorTim Peters <tim.peters@gmail.com>
Tue, 14 Mar 2006 22:48:56 +0000 (22:48 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 14 Mar 2006 22:48:56 +0000 (22:48 +0000)
Since it's never intended that this script be run by
regrtest.py, it shouldn't have been named with a "test_"
prefix to begin with.  A consequence is that we shouldn't
see useless:

    test_hashlib_speed skipped -- not a unit test (stand alone benchmark)

lines in regrtest output anymore.

Lib/test/regrtest.py
Lib/test/time_hashlib.py [moved from Lib/test/test_hashlib_speed.py with 92% similarity]

index b4c229ac4bc7f73c0592201bd5a477e3212a35d3..b8509129c87d4bec70ed9c53bbfce895baa0e2f3 100755 (executable)
@@ -1136,9 +1136,6 @@ class _ExpectedSkips:
             s = _expectations[sys.platform]
             self.expected = set(s.split())
 
-            # this isn't a regularly run unit test, it is always skipped
-            self.expected.add('test_hashlib_speed')
-
             if not os.path.supports_unicode_filenames:
                 self.expected.add('test_pep277')
 
similarity index 92%
rename from Lib/test/test_hashlib_speed.py
rename to Lib/test/time_hashlib.py
index c84a62bdf332f28411cca4112c9aae00f23c2772..1bf707da19b31a3e9f90163c39f3a88530214ad5 100644 (file)
@@ -1,15 +1,14 @@
+# It's intended that this script be run by hand.  It runs speed tests on
+# hashlib functions; it does not test for correctness.
 
 import sys, time
 import hashlib
-from test import test_support
 
 
 def creatorFunc():
     raise RuntimeError, "eek, creatorFunc not overridden"
 
-
 def test_scaled_msg(scale, name):
-
     iterations = 106201/scale * 20
     longStr = 'Z'*scale
 
@@ -39,10 +38,6 @@ def test_zero():
 
 
 
-### this 'test' is not normally run.  skip it if the test runner finds it
-if __name__ != '__main__':
-    raise test_support.TestSkipped, "not a unit test (stand alone benchmark)"
-
 hName = sys.argv[1]
 
 #