2013-04-11 22:34:04 +08:00
|
|
|
#!/usr/bin/env python
|
2012-11-24 02:57:22 +08:00
|
|
|
|
2014-08-07 12:51:48 +08:00
|
|
|
from __future__ import print_function
|
2017-09-03 20:01:25 +08:00
|
|
|
|
2017-11-23 18:08:26 +08:00
|
|
|
import sys
|
|
|
|
sys.dont_write_bytecode = True # Don't generate .pyc files / __pycache__ directories
|
|
|
|
|
2011-05-04 00:00:31 +08:00
|
|
|
import os
|
2017-09-03 20:01:25 +08:00
|
|
|
import unittest
|
2011-05-04 00:00:31 +08:00
|
|
|
|
2014-08-07 12:51:48 +08:00
|
|
|
# Python 3 moved urlopen to urllib.requests
|
|
|
|
try:
|
|
|
|
from urllib.request import urlopen
|
|
|
|
except ImportError:
|
|
|
|
from urllib import urlopen
|
|
|
|
|
2016-01-28 20:43:08 +08:00
|
|
|
from tests_common import NewOpenCVTests
|
2011-05-04 00:00:31 +08:00
|
|
|
|
|
|
|
|
2016-01-29 23:00:18 +08:00
|
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
|
|
def load_tests(loader, tests, pattern):
|
2017-08-28 22:26:49 +08:00
|
|
|
tests.addTests(loader.discover(basedir, pattern=os.environ.get('OPENCV_PYTEST_FILTER', 'test_') + '*.py'))
|
2016-01-29 23:00:18 +08:00
|
|
|
return tests
|
|
|
|
|
2011-05-04 00:00:31 +08:00
|
|
|
if __name__ == '__main__':
|
2017-09-03 20:01:25 +08:00
|
|
|
NewOpenCVTests.bootstrap()
|