From 5c8ef477b16df3de6b49ac50fa17d21d8cdd815e Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Tue, 9 Mar 2021 20:25:11 +0100 Subject: Migrate func_loopvar_in_dict_comp_py27.py to new functional tests --- tests/functional/l/loopvar_in_dict_comp_py27.py | 8 ++++++++ tests/functional/l/loopvar_in_dict_comp_py27.txt | 1 + tests/input/func_loopvar_in_dict_comp_py27.py | 8 -------- tests/messages/func_loopvar_in_dict_comp_py27.txt | 1 - 4 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 tests/functional/l/loopvar_in_dict_comp_py27.py create mode 100644 tests/functional/l/loopvar_in_dict_comp_py27.txt delete mode 100644 tests/input/func_loopvar_in_dict_comp_py27.py delete mode 100644 tests/messages/func_loopvar_in_dict_comp_py27.txt diff --git a/tests/functional/l/loopvar_in_dict_comp_py27.py b/tests/functional/l/loopvar_in_dict_comp_py27.py new file mode 100644 index 000000000..072ea1bf5 --- /dev/null +++ b/tests/functional/l/loopvar_in_dict_comp_py27.py @@ -0,0 +1,8 @@ +"""Tests for loopvar-in-closure.""" + +__revision__ = 0 + + +def bad_case(): + """Loop variable from dict comprehension.""" + return {x: lambda: x for x in range(10)} # [cell-var-from-loop] diff --git a/tests/functional/l/loopvar_in_dict_comp_py27.txt b/tests/functional/l/loopvar_in_dict_comp_py27.txt new file mode 100644 index 000000000..2d98fcfff --- /dev/null +++ b/tests/functional/l/loopvar_in_dict_comp_py27.txt @@ -0,0 +1 @@ +cell-var-from-loop:8:23:bad_case.:Cell variable x defined in loop diff --git a/tests/input/func_loopvar_in_dict_comp_py27.py b/tests/input/func_loopvar_in_dict_comp_py27.py deleted file mode 100644 index 312eee727..000000000 --- a/tests/input/func_loopvar_in_dict_comp_py27.py +++ /dev/null @@ -1,8 +0,0 @@ -"""Tests for loopvar-in-closure.""" - -__revision__ = 0 - - -def bad_case(): - """Loop variable from dict comprehension.""" - return {x: lambda: x for x in range(10)} diff --git a/tests/messages/func_loopvar_in_dict_comp_py27.txt b/tests/messages/func_loopvar_in_dict_comp_py27.txt deleted file mode 100644 index bc11121c4..000000000 --- a/tests/messages/func_loopvar_in_dict_comp_py27.txt +++ /dev/null @@ -1 +0,0 @@ -W: 8:bad_case.: Cell variable x defined in loop -- cgit v1.2.1