summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2015-05-31 08:01:11 +0200
committerStefan Behnel <stefan_ml@behnel.de>2015-06-06 07:40:57 +0200
commitea970763757dc400a8b48dc702986c318f73963d (patch)
tree52cc0280cc78c5fbf76a7724ca99c4de9c1d6939
parent00c8bbf0ced8f7df1635ddac240c5b281c2bbc25 (diff)
downloadcython-ea970763757dc400a8b48dc702986c318f73963d.tar.gz
use relative file path in test runner output
-rwxr-xr-xruntests.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/runtests.py b/runtests.py
index d170cb365..15652c048 100755
--- a/runtests.py
+++ b/runtests.py
@@ -1486,20 +1486,18 @@ class VersionDependencyExcluder:
return True
return False
+
class FileListExcluder:
def __init__(self, list_file, verbose=False):
self.verbose = verbose
self.excludes = {}
- self._list_file = list_file
- f = open(list_file)
- try:
- for line in f.readlines():
+ self._list_file = os.path.relpath(list_file)
+ with open(list_file) as f:
+ for line in f:
line = line.strip()
if line and line[0] != '#':
self.excludes[line.split()[0]] = True
- finally:
- f.close()
def __call__(self, testname, tags=None):
exclude = (testname in self.excludes
@@ -1509,6 +1507,7 @@ class FileListExcluder:
% (testname, self._list_file))
return exclude
+
class TagsSelector:
def __init__(self, tag, value):