summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Unterwaditzer <markus@unterwaditzer.net>2019-05-05 01:55:31 +0200
committerSteven Myint <git@stevenmyint.com>2019-05-04 16:55:31 -0700
commit0b163640274b15b74ac9a650cf24439b0205fc76 (patch)
tree6eebb06618474e1b3aea4b4b01c8accfd4b58683
parent232cb1d27ee134bf96adc8f37e53589dc259b159 (diff)
downloadpyflakes-0b163640274b15b74ac9a650cf24439b0205fc76.tar.gz
Add another test for #422 (#433)
* Add another test for #422 * remove old test
-rw-r--r--pyflakes/test/test_type_annotations.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/pyflakes/test/test_type_annotations.py b/pyflakes/test/test_type_annotations.py
index b8876cb..03f70bb 100644
--- a/pyflakes/test/test_type_annotations.py
+++ b/pyflakes/test/test_type_annotations.py
@@ -77,24 +77,16 @@ class TestTypeAnnotations(TestCase):
def test_not_a_typing_overload(self):
"""regression test for @typing.overload detection bug in 2.1.0"""
self.flakes("""
- x = lambda f: f
+ def foo(x):
+ return x
- @x
- def t():
+ @foo
+ def bar():
pass
- y = lambda f: f
-
- @x
- @y
- def t():
- pass
-
- @x
- @y
- def t():
+ def bar():
pass
- """, m.RedefinedWhileUnused, m.RedefinedWhileUnused)
+ """, m.RedefinedWhileUnused)
@skipIf(version_info < (3, 6), 'new in Python 3.6')
def test_variable_annotations(self):