diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/input/func_noerror_defined_and_used_on_same_line.py | 3 | ||||
-rw-r--r-- | test/input/func_noerror_defined_and_used_on_same_line_py27.py | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/input/func_noerror_defined_and_used_on_same_line.py b/test/input/func_noerror_defined_and_used_on_same_line.py index a6a869fed..71e67b9da 100644 --- a/test/input/func_noerror_defined_and_used_on_same_line.py +++ b/test/input/func_noerror_defined_and_used_on_same_line.py @@ -28,6 +28,3 @@ FUNC3 = lambda (a, b) : a != b # test http://www.logilab.org/ticket/6954: with open('f') as f: print(f.read()) - -with open('f') as f, open(f.read()) as g: - print g.read() diff --git a/test/input/func_noerror_defined_and_used_on_same_line_py27.py b/test/input/func_noerror_defined_and_used_on_same_line_py27.py new file mode 100644 index 000000000..5a7572205 --- /dev/null +++ b/test/input/func_noerror_defined_and_used_on_same_line_py27.py @@ -0,0 +1,5 @@ +#pylint: disable=C0111,C0321 +"""pylint complains about 'index' being used before definition""" + +with open('f') as f, open(f.read()) as g: + print g.read() |