diff options
author | shimizukawa <shimizukawa@gmail.com> | 2017-01-07 02:13:50 +0900 |
---|---|---|
committer | shimizukawa <shimizukawa@gmail.com> | 2017-01-07 02:14:29 +0900 |
commit | 4c22cd10caa7b9621ece480fade5653d65226fcc (patch) | |
tree | 19a64268e9814dfa12087dc2d432c5339a23a0a9 /tests/run.py | |
parent | f695aac2e28e1463385b399b61fc2c4b4ef40c5c (diff) | |
parent | 620616cdbd92147f6ea7bbeb670dc3a0562235ff (diff) | |
download | sphinx-git-4c22cd10caa7b9621ece480fade5653d65226fcc.tar.gz |
Merge branch 'stable'
Diffstat (limited to 'tests/run.py')
-rwxr-xr-x | tests/run.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/run.py b/tests/run.py index 273b2ee6b..72a668541 100755 --- a/tests/run.py +++ b/tests/run.py @@ -17,14 +17,14 @@ import warnings import traceback from path import path -import nose +import pytest testroot = os.path.dirname(__file__) or '.' sys.path.insert(0, os.path.abspath(os.path.join(testroot, os.path.pardir))) # check dependencies before testing print('Checking dependencies...') -for modname in ('nose', 'mock', 'six', 'docutils', 'jinja2', 'pygments', +for modname in ('pytest', 'mock', 'six', 'docutils', 'jinja2', 'pygments', 'snowballstemmer', 'babel', 'html5lib'): try: __import__(modname) @@ -50,7 +50,15 @@ print('Running Sphinx test suite (with Python %s)...' % sys.version.split()[0]) sys.stdout.flush() # filter warnings of test dependencies -warnings.filterwarnings('ignore', category=DeprecationWarning, module='nose.util') warnings.filterwarnings('ignore', category=DeprecationWarning, module='site') # virtualenv -nose.main(argv=sys.argv) +# exclude 'root' and 'roots' dirs for pytest test collector +ignore_paths = [ + os.path.relpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), sub)) + for sub in ('root', 'roots') +] +args = sys.argv[1:] +for path in ignore_paths: + args.extend(['--ignore', path]) + +sys.exit(pytest.main(args)) |