summaryrefslogtreecommitdiff
path: root/src/python/stdlib/test/test_global.py
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-26 13:50:50 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-26 13:50:50 (GMT)
commite46ef289e142982d7bd592faa7b0f85470364c01 (patch)
treecda253e03788f7db0a7cdcd05662f66b4455e298 /src/python/stdlib/test/test_global.py
parentd0d0d62bbcbb5c3417f8cba419c83bac192ea985 (diff)
downloadpowder-e46ef289e142982d7bd592faa7b0f85470364c01.zip
powder-e46ef289e142982d7bd592faa7b0f85470364c01.tar.gz
Remove Python console stuff
Diffstat (limited to 'src/python/stdlib/test/test_global.py')
-rw-r--r--src/python/stdlib/test/test_global.py52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/python/stdlib/test/test_global.py b/src/python/stdlib/test/test_global.py
deleted file mode 100644
index abcb193..0000000
--- a/src/python/stdlib/test/test_global.py
+++ /dev/null
@@ -1,52 +0,0 @@
-"""Verify that warnings are issued for global statements following use."""
-
-from test.test_support import run_unittest, check_syntax_error
-import unittest
-import warnings
-
-
-class GlobalTests(unittest.TestCase):
-
- def test1(self):
- prog_text_1 = """\
-def wrong1():
- a = 1
- b = 2
- global a
- global b
-"""
- check_syntax_error(self, prog_text_1)
-
- def test2(self):
- prog_text_2 = """\
-def wrong2():
- print x
- global x
-"""
- check_syntax_error(self, prog_text_2)
-
- def test3(self):
- prog_text_3 = """\
-def wrong3():
- print x
- x = 2
- global x
-"""
- check_syntax_error(self, prog_text_3)
-
- def test4(self):
- prog_text_4 = """\
-global x
-x = 2
-"""
- # this should work
- compile(prog_text_4, "<test string>", "exec")
-
-
-def test_main():
- with warnings.catch_warnings():
- warnings.filterwarnings("error", module="<test string>")
- run_unittest(GlobalTests)
-
-if __name__ == "__main__":
- test_main()