Commit 5dfefdad authored by Stefan Behnel's avatar Stefan Behnel

Exclude code-style test automatically if pycodestyle is not installed.

parent 61c5158a
......@@ -2446,7 +2446,13 @@ def runtests(options, cmd_args, coverage=None):
test_suite.addTest(filetests.handle_directory(sys_pyregr_dir, 'pyregr'))
if options.code_style and options.shard_num <= 0:
test_suite.addTest(TestCodeFormat(options.cython_dir))
try:
import pycodestyle
except ImportError:
# Hack to make the exclusion visible.
missing_dep_excluder.tests_missing_deps.append('TestCodeFormat')
else:
test_suite.addTest(TestCodeFormat(options.cython_dir))
if xml_output_dir:
from Cython.Tests.xmlrunner import XMLTestRunner
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment