Back to index

python3.2  3.2.2
Public Member Functions | Private Attributes
test.test_global.GlobalTests Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test1
def test2
def test3
def test4

Private Attributes

 _warnings_manager

Detailed Description

Definition at line 8 of file test_global.py.


Member Function Documentation

Definition at line 10 of file test_global.py.

00010 
00011     def setUp(self):
00012         self._warnings_manager = check_warnings()
00013         self._warnings_manager.__enter__()
00014         warnings.filterwarnings("error", module="<test string>")

Here is the caller graph for this function:

Definition at line 15 of file test_global.py.

00015 
00016     def tearDown(self):
00017         self._warnings_manager.__exit__(None, None, None)
00018 

Here is the caller graph for this function:

Definition at line 19 of file test_global.py.

00019 
00020     def test1(self):
00021         prog_text_1 = """\
00022 def wrong1():
00023     a = 1
00024     b = 2
00025     global a
00026     global b
00027 """
00028         check_syntax_error(self, prog_text_1)

Here is the call graph for this function:

Definition at line 29 of file test_global.py.

00029 
00030     def test2(self):
00031         prog_text_2 = """\
00032 def wrong2():
00033     print(x)
00034     global x
00035 """
00036         check_syntax_error(self, prog_text_2)

Here is the call graph for this function:

Definition at line 37 of file test_global.py.

00037 
00038     def test3(self):
00039         prog_text_3 = """\
00040 def wrong3():
00041     print(x)
00042     x = 2
00043     global x
00044 """
00045         check_syntax_error(self, prog_text_3)

Here is the call graph for this function:

Definition at line 46 of file test_global.py.

00046 
00047     def test4(self):
00048         prog_text_4 = """\
00049 global x
00050 x = 2
00051 """
00052         # this should work
00053         compile(prog_text_4, "<test string>", "exec")
00054 

Here is the call graph for this function:


Member Data Documentation

Definition at line 11 of file test_global.py.


The documentation for this class was generated from the following file: