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

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

parent 61c5158a
...@@ -2446,6 +2446,12 @@ def runtests(options, cmd_args, coverage=None): ...@@ -2446,6 +2446,12 @@ def runtests(options, cmd_args, coverage=None):
test_suite.addTest(filetests.handle_directory(sys_pyregr_dir, 'pyregr')) test_suite.addTest(filetests.handle_directory(sys_pyregr_dir, 'pyregr'))
if options.code_style and options.shard_num <= 0: if options.code_style and options.shard_num <= 0:
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)) test_suite.addTest(TestCodeFormat(options.cython_dir))
if xml_output_dir: if xml_output_dir:
......
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