Skip to content

Commit

Permalink
python(test): add tests filter
Browse files Browse the repository at this point in the history
Usage example (bash):
$ OPENCV_PYTEST_FILTER=test_digits python test.py -v
  • Loading branch information
alalek committed Nov 23, 2017
1 parent e4aa2cc commit 3ee8079
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/python/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
basedir = os.path.abspath(os.path.dirname(__file__))

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

if __name__ == '__main__':
Expand Down

0 comments on commit 3ee8079

Please sign in to comment.