diff options
author | Rafael H. Schloming <rhs@apache.org> | 2007-08-21 20:01:51 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2007-08-21 20:01:51 +0000 |
commit | 927423df31ee95378afbf5ee7a0f558a7def33bb (patch) | |
tree | 0d4bf61b6316933ca2e42ade1fad03cf75899783 /python/qpid/testlib.py | |
parent | 8540702068eda8d37c40992ce6d70e9ab4af3237 (diff) | |
download | qpid-python-927423df31ee95378afbf5ee7a0f558a7def33bb.tar.gz |
made -i and -I support pattern matches
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568248 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/testlib.py')
-rw-r--r-- | python/qpid/testlib.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/qpid/testlib.py b/python/qpid/testlib.py index 6820ae3bae..c06a252f16 100644 --- a/python/qpid/testlib.py +++ b/python/qpid/testlib.py @@ -24,6 +24,7 @@ import sys, re, unittest, os, random, logging import qpid.client, qpid.spec import Queue +from fnmatch import fnmatch from getopt import getopt, GetoptError from qpid.content import Content from qpid.message import Message @@ -148,8 +149,10 @@ Options: def testSuite(self): class IgnoringTestSuite(unittest.TestSuite): def addTest(self, test): - if isinstance(test, unittest.TestCase) and test.id() in testrunner.ignore: - return + if isinstance(test, unittest.TestCase): + for pattern in testrunner.ignore: + if fnmatch(test.id(), pattern): + return unittest.TestSuite.addTest(self, test) # Use our IgnoringTestSuite in the test loader. |