return ('.' in pattern) and (not re.search(r'[?*\[\]]', pattern))
+def get_match_tests():
+ global _test_patterns
+ return _test_patterns
+
+
def set_match_tests(patterns):
global _test_matchers, _test_patterns
from test.libregrtest import main
from test.libregrtest import setup
from test.libregrtest import utils
-from test.libregrtest.filter import set_match_tests, match_test
+from test.libregrtest.filter import get_match_tests, set_match_tests, match_test
from test.libregrtest.result import TestStats
from test.libregrtest.utils import normalize_test_name
def id(self):
return self.test_id
+ # Restore patterns once the test completes
+ patterns = get_match_tests()
+ self.addCleanup(set_match_tests, patterns)
+
test_access = Test('test.test_os.FileTests.test_access')
test_chdir = Test('test.test_os.Win32ErrorTests.test_chdir')
test_copy = Test('test.test_shutil.TestCopy.test_copy')