Automatically skip thirdparty test if not importable

This commit is contained in:
Takafumi Arakaki
2013-03-12 13:49:20 +01:00
parent 6c71fad802
commit ab5266b840
3 changed files with 20 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ def pytest_generate_tests(metafunc):
cases = list(run.collect_dir_tests(base_dir, test_files))
if thirdparty:
cases.extend(run.collect_dir_tests(
os.path.join(base_dir, 'thirdparty'), test_files))
os.path.join(base_dir, 'thirdparty'), test_files, True))
metafunc.parametrize('case', cases)
if 'refactor_case' in metafunc.fixturenames:
base_dir = metafunc.config.option.refactor_case_dir