tests/run-tests.py
branchstable
changeset 1366 987a80dec7db
parent 1365 51476d2dcab1
child 1368 27b5b55ff3d3
--- 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)