[Python-checkins] cpython: Make regrtest recognize test packages as well as test modules.

r.david.murray python-checkins at python.org
Mon Mar 21 20:15:19 CET 2011


http://hg.python.org/cpython/rev/374f662a8aef
changeset:   68816:374f662a8aef
user:        R David Murray <rdmurray at bitdance.com>
date:        Mon Mar 21 15:14:34 2011 -0400
summary:
  Make regrtest recognize test packages as well as test modules.

files:
  Lib/test/regrtest.py

diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -732,9 +732,9 @@
     tests = []
     others = set(stdtests) | nottests
     for name in names:
-        modname, ext = os.path.splitext(name)
-        if modname[:5] == "test_" and ext == ".py" and modname not in others:
-            tests.append(modname)
+        mod, ext = os.path.splitext(name)
+        if mod[:5] == "test_" and ext in (".py", "") and mod not in others:
+            tests.append(mod)
     return stdtests + sorted(tests)
 
 def replace_stdout():

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list