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 | 8e97302911b515502f0a85169da43d4a33b54cf9 (patch) | |
| tree | 7a0ce3168b537443af8fa8144922cccad2839538 /qpid/python | |
| parent | ebf6ad7f0b2dd711ae52913cd4d3564f4d9e0581 (diff) | |
| download | qpid-python-8e97302911b515502f0a85169da43d4a33b54cf9.tar.gz | |
made -i and -I support pattern matches
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@568248 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
| -rw-r--r-- | qpid/python/qpid/testlib.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qpid/python/qpid/testlib.py b/qpid/python/qpid/testlib.py index 6820ae3bae..c06a252f16 100644 --- a/qpid/python/qpid/testlib.py +++ b/qpid/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. |
