From adde8bfb3f90f2d2204500bce75550fee8369bcb Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 27 Nov 2013 14:45:10 -0500 Subject: Do a better job of pattern matching for the nose2 -P plugin switch. --- src/mailman/testing/nose.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mailman/testing/nose.py b/src/mailman/testing/nose.py index 8ac85a756..b258a67b9 100644 --- a/src/mailman/testing/nose.py +++ b/src/mailman/testing/nose.py @@ -67,15 +67,19 @@ class NosePlugin(Plugin): return # Does the pattern match the fully qualified class name? for pattern in self.patterns: - full_name = '{}.{}'.format( + full_class_name = '{}.{}'.format( event.testCase.__module__, event.testCase.__name__) - if re.search(pattern, full_name): + if re.search(pattern, full_class_name): # Don't suppress this test class. return names = filter(event.isTestMethod, dir(event.testCase)) for name in names: + full_test_name = '{}.{}.{}'.format( + event.testCase.__module__, + event.testCase.__name__, + name) for pattern in self.patterns: - if re.search(pattern, name): + if re.search(pattern, full_test_name): break else: event.excludedNames.append(name) -- cgit v1.2.3-70-g09d2