Skip to content

Commit 3ee8079

Browse files
committed
python(test): add tests filter
Usage example (bash): $ OPENCV_PYTEST_FILTER=test_digits python test.py -v
1 parent e4aa2cc commit 3ee8079

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/python/test/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
basedir = os.path.abspath(os.path.dirname(__file__))
1818

1919
def load_tests(loader, tests, pattern):
20-
tests.addTests(loader.discover(basedir, pattern='test_*.py'))
20+
tests.addTests(loader.discover(basedir, pattern=os.environ.get('OPENCV_PYTEST_FILTER', 'test_') + '*.py'))
2121
return tests
2222

2323
if __name__ == '__main__':

0 commit comments

Comments
 (0)