From 38232fe133436c089ef63bb955864eeecd979c26 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 15 Jun 2019 22:26:34 +0200 Subject: [PATCH] Fix issues with Python 3.7 tests --- test/test_evaluate/test_gradual/test_stubs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_evaluate/test_gradual/test_stubs.py b/test/test_evaluate/test_gradual/test_stubs.py index 2ff6480d..04656702 100644 --- a/test/test_evaluate/test_gradual/test_stubs.py +++ b/test/test_evaluate/test_gradual/test_stubs.py @@ -47,6 +47,11 @@ def test_infer_and_goto(Script, code, full_name, has_stub, has_python, way, # anymore, because its end-of-life soon. pytest.skip() + if type_ == 'infer' and full_name == 'typing.Sequence' and environment.version_info >= (3, 7): + # In Python 3.7+ there's not really a sequence definition, there's just + # a name that leads nowhere. + has_python = False + project = Project(os.path.join(root_dir, 'test', 'completion', 'stub_folder')) s = Script(code, _project=project) prefer_stubs = kwargs['prefer_stubs']