summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain <syt@logilab.fr>2006-09-23 13:06:17 +0200
committerSylvain <syt@logilab.fr>2006-09-23 13:06:17 +0200
commite8dda7d5ec96f726f95d443e3236d173ba9333de (patch)
tree797c1bf14118f5fbfac591a4378a0aa555b6ad06
parentb896ddaebecc3f1fdc812b88105903ac2b8eceec (diff)
downloadlogilab-common-e8dda7d5ec96f726f95d443e3236d173ba9333de.tar.gz
fixed a bug in find_test making it returns some bad test names
-rw-r--r--testlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testlib.py b/testlib.py
index dba29f6..b123196 100644
--- a/testlib.py
+++ b/testlib.py
@@ -207,8 +207,8 @@ def find_tests(testdir,
if not suffix or name.endswith(suffix):
for prefix in prefixes:
if name.startswith(prefix):
- if remove_suffix:
- name = name.rstrip(suffix)
+ if remove_suffix and name.endswith(suffix):
+ name = name[:-len(suffix)]
if name not in excludes:
tests.append(name)
tests.sort()