Skip more tests if it's necessary.

This commit is contained in:
Dave Halter
2017-12-23 19:56:47 +01:00
parent 87666d72a1
commit 7ad37fb976

View File

@@ -34,7 +34,9 @@ unspecified = %s
def test_completion(case, monkeypatch, environment, has_typing):
if case.skip is not None:
pytest.skip(case.skip)
if not has_typing and 'typing' in case.path:
_CONTAINS_TYPING = ('pep0484_typing', 'pep0484_comments', 'pep0526_variables')
if not has_typing and any(x in case.path for x in _CONTAINS_TYPING):
pytest.skip('Needs the typing module installed to run this test.')
repo_root = helpers.root_dir
monkeypatch.chdir(os.path.join(repo_root, 'jedi'))