diff options
| author | cpopa <devnull@localhost> | 2013-07-27 15:50:49 +0300 |
|---|---|---|
| committer | cpopa <devnull@localhost> | 2013-07-27 15:50:49 +0300 |
| commit | ef2209b2a9846fbd3878474eeac91a8fc55751bc (patch) | |
| tree | dfa72ba9aeba1297a9d8de15422fab25d45813c7 /test | |
| parent | cf74f295ec39224c36d20422d52051e4544e0eb8 (diff) | |
| download | pylint-ef2209b2a9846fbd3878474eeac91a8fc55751bc.tar.gz | |
Check for builtin exec function for Python 3.
Diffstat (limited to 'test')
| -rw-r--r-- | test/input/func_exec_function_py30.py | 13 | ||||
| -rw-r--r-- | test/messages/func_exec_function_py30.txt | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/input/func_exec_function_py30.py b/test/input/func_exec_function_py30.py new file mode 100644 index 0000000..dbcc024 --- /dev/null +++ b/test/input/func_exec_function_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_function_py30.txt b/test/messages/func_exec_function_py30.txt new file mode 100644 index 0000000..a867b82 --- /dev/null +++ b/test/messages/func_exec_function_py30.txt @@ -0,0 +1,4 @@ +W: 5: Use of the exec function
+W: 6: Use of the exec function
+W: 8: Use of the exec function
+W: 12:func: Use of the exec function
|
