diff options
| author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-02-28 23:49:19 +0000 |
|---|---|---|
| committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-02-28 23:49:19 +0000 |
| commit | 2922ea8235c183cb35c3415b5888967af55812fa (patch) | |
| tree | 42e315ecc3ff6956756ccbaff13a9b0dfebabe47 /Lib/test/test_global.py | |
| parent | 3dd5ad3b4f1e7be153d272a2ac3848028a6c306b (diff) | |
| download | cpython-git-2922ea8235c183cb35c3415b5888967af55812fa.tar.gz | |
Add test case for global stmt at module level.
Fix test_grammar so that it ignores warning about global stmt at
module level in exec.
Diffstat (limited to 'Lib/test/test_global.py')
| -rw-r--r-- | Lib/test/test_global.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_global.py b/Lib/test/test_global.py index c60d0c7b29..b41b7d4cc8 100644 --- a/Lib/test/test_global.py +++ b/Lib/test/test_global.py @@ -37,3 +37,9 @@ def wrong3(): global x """ compile_and_catch_warning(prog_text_3) + +prog_text_4 = """ +global x +x = 2 +""" +compile_and_catch_warning(prog_text_4) |
