1 """Verify that warnings are issued for global statements following use."""
3 from test
.test_support
import run_unittest
, check_syntax_error
7 warnings
.filterwarnings("error", module
="<test string>")
9 class GlobalTests(unittest
.TestCase
):
19 check_syntax_error(self
, prog_text_1
)
27 check_syntax_error(self
, prog_text_2
)
36 check_syntax_error(self
, prog_text_3
)
44 compile(prog_text_4
, "<test string>", "exec")
48 run_unittest(GlobalTests
)
50 if __name__
== "__main__":