提交 3ee8079f 编写于 作者: A Alexander Alekhin

python(test): add tests filter

Usage example (bash):
$ OPENCV_PYTEST_FILTER=test_digits python test.py -v
上级 e4aa2ccd
......@@ -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__':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册