diff options
| author | cpopa <devnull@localhost> | 2013-08-02 12:32:47 +0300 |
|---|---|---|
| committer | cpopa <devnull@localhost> | 2013-08-02 12:32:47 +0300 |
| commit | 223ecc8e017662c60b6e5fed1f7cec4893a89cd3 (patch) | |
| tree | 19496cc08884dc625a1fb806fb91b3fe0c7caa8a /test | |
| parent | f1b0ea4a88aeaa100865a056f9321c9646565bb9 (diff) | |
| parent | 1f5d694f0af58af8c5a6032dc4d57b08653500d5 (diff) | |
| download | pylint-exec.tar.gz | |
merge with Pylint defaultexec
Diffstat (limited to 'test')
| -rw-r--r-- | test/input/func_exec_used_py30.py | 13 | ||||
| -rw-r--r-- | test/messages/func_exec_used_py30.txt | 4 | ||||
| -rw-r--r-- | test/messages/func_w0122_py_30.txt | 8 |
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 |
