From 5c70a2015f3c5bb3cbf6ddd09c5f3ca33575cd89 Mon Sep 17 00:00:00 2001 From: Dale Phurrough Date: Tue, 26 Jan 2021 18:32:20 +0100 Subject: [PATCH] fix python test runner wildcard handling * fix opencv/opencv#19402 --- modules/python/test/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/test/test.py b/modules/python/test/test.py index 97c2144303..a40c6c5d7e 100755 --- a/modules/python/test/test.py +++ b/modules/python/test/test.py @@ -34,8 +34,8 @@ def load_tests(loader, tests, pattern): else: print('WARNING: OpenCV tests config file ({}) is missing, running subset of tests'.format(config_file)) - tests_pattern = os.environ.get('OPENCV_PYTEST_FILTER', 'test_') + '*.py' - if tests_pattern != 'test_*py': + tests_pattern = os.environ.get('OPENCV_PYTEST_FILTER', 'test_*') + '.py' + if tests_pattern != 'test_*.py': print('Tests filter: {}'.format(tests_pattern)) processed = set()