summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Gedminas <marius@gedmin.as>2013-02-09 16:53:51 +0000
committerMarius Gedminas <marius@gedmin.as>2013-02-09 16:53:51 +0000
commite9822e89ce1822334022b840dd05b810959294e3 (patch)
tree6d1890c93ba3270919a45542c4071389eee161dc
parentf3be086ab5e2b1b972f043bee535ba5384320aea (diff)
downloadzope-tal-e9822e89ce1822334022b840dd05b810959294e3.tar.gz
Make it possible to filter FileTestCases by filename.
Example: bin/test -t test04.xml
-rw-r--r--src/zope/tal/tests/test_files.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zope/tal/tests/test_files.py b/src/zope/tal/tests/test_files.py
index 858c8aa..2d87654 100644
--- a/src/zope/tal/tests/test_files.py
+++ b/src/zope/tal/tests/test_files.py
@@ -43,6 +43,11 @@ class FileTestCase(unittest.TestCase):
path = os.path.basename(self.__file)
return '%s (%s)' % (path, self.__class__)
+ def id(self):
+ return os.path.relpath(self.__file, os.path.dirname(__file__))
+
+ __str__ = id
+
def runTest(self):
basename = os.path.basename(self.__file)
if basename.startswith('test_sa'):