From 8e2bfdc07ec56cd5fcd363183f976f4a5ba934b7 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 1 Jan 2020 14:03:42 +0100 Subject: [PATCH] Add a test for #1465 --- test/test_inference/test_signature.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/test_inference/test_signature.py b/test/test_inference/test_signature.py index 759ea99f..41b7d2c2 100644 --- a/test/test_inference/test_signature.py +++ b/test/test_inference/test_signature.py @@ -293,9 +293,14 @@ def test_param_resolving_to_static(Script, stmt, expected, skip_pre_python35): assert sig.to_string() == expected -def test_overload(Script): +@pytest.mark.parametrize( + 'code', [ + 'from file import with_overload; with_overload(', + 'from file import *\nwith_overload(', + ] +) +def test_overload(Script, code): dir_ = get_example_dir('typing_overload') - code = 'from file import with_overload; with_overload(' x1, x2 = Script(code, path=os.path.join(dir_, 'foo.py')).find_signatures() assert x1.to_string() == 'with_overload(x: int, y: int) -> float' assert x2.to_string() == 'with_overload(x: str, y: list) -> float'