summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/input/func_exec_used_py30.py13
-rw-r--r--test/messages/func_exec_used_py30.txt4
-rw-r--r--test/messages/func_w0122_py_30.txt8
3 files changed, 21 insertions, 4 deletions
diff --git a/test/input/func_exec_used_py30.py b/test/input/func_exec_used_py30.py
new file mode 100644
index 0000000..dbcc024
--- /dev/null
+++ b/test/input/func_exec_used_py30.py
@@ -0,0 +1,13 @@
+"""test global statement"""
+
+__revision__ = 0
+
+exec('a = __revision__')
+exec('a = 1', globals={})
+
+exec('a = 1', globals=globals())
+
+def func():
+ """exec in local scope"""
+ exec('b = 1')
+
diff --git a/test/messages/func_exec_used_py30.txt b/test/messages/func_exec_used_py30.txt
new file mode 100644
index 0000000..362da68
--- /dev/null
+++ b/test/messages/func_exec_used_py30.txt
@@ -0,0 +1,4 @@
+W: 5: Use of exec
+W: 6: Use of exec
+W: 8: Use of exec
+W: 12:func: Use of exec
diff --git a/test/messages/func_w0122_py_30.txt b/test/messages/func_w0122_py_30.txt
index 1522cac..d833076 100644
--- a/test/messages/func_w0122_py_30.txt
+++ b/test/messages/func_w0122_py_30.txt
@@ -1,5 +1,5 @@
-W: 5: Use of the exec statement
-W: 6: Use of the exec statement
-W: 8: Use of the exec statement
-W: 12:func: Use of the exec statement
+W: 5: Use of exec
+W: 6: Use of exec
+W: 8: Use of exec
+W: 12:func: Use of exec