tests/run-tests.py
changeset 21009 990f5392c018
parent 21008 c1dd04be3d9a
child 21022 52e9e63f1495
--- a/tests/run-tests.py	Mon Mar 24 21:52:28 2014 -0700
+++ b/tests/run-tests.py	Mon Mar 24 22:12:37 2014 -0700
@@ -939,7 +939,7 @@
                 else:
                     return ignore("doesn't match keyword")
 
-    if not lctest.startswith("test-"):
+    if not os.path.basename(lctest).startswith("test-"):
         return skip("not a test file")
     for ext, func, out in testtypes:
         if lctest.endswith(ext):
@@ -1197,8 +1197,8 @@
             args = os.listdir(".")
 
     tests = [t for t in args
-             if t.startswith("test-")
-             and (t.endswith(".py") or t.endswith(".t"))]
+             if os.path.basename(t).startswith("test-")
+                 and (t.endswith(".py") or t.endswith(".t"))]
 
     if options.random:
         random.shuffle(tests)