mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 05:06:29 +08:00
python(test): add tests filter
Usage example (bash): $ OPENCV_PYTEST_FILTER=test_digits python test.py -v
This commit is contained in:
parent
e4aa2ccd66
commit
3ee8079f35
@ -17,7 +17,7 @@ from tests_common import NewOpenCVTests
|
||||
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__':
|
||||
|
Loading…
Reference in New Issue
Block a user