LEFT | RIGHT |
1 # Test the frozen module defined in frozen.c. | 1 # Test the frozen module defined in frozen.c. |
2 | 2 |
3 from test.support import captured_stdout, run_unittest | 3 from test.support import captured_stdout, run_unittest |
4 import unittest | 4 import unittest |
5 import sys | 5 import sys |
6 | 6 |
7 class FrozenTests(unittest.TestCase): | 7 class FrozenTests(unittest.TestCase): |
8 def test_frozen(self): | 8 def test_frozen(self): |
9 try: | 9 try: |
10 import __hello__ | 10 import __hello__ |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 del sys.modules['__hello__'] | 50 del sys.modules['__hello__'] |
51 del sys.modules['__phello__'] | 51 del sys.modules['__phello__'] |
52 del sys.modules['__phello__.spam'] | 52 del sys.modules['__phello__.spam'] |
53 | 53 |
54 def test_main(): | 54 def test_main(): |
55 run_unittest(FrozenTests) | 55 run_unittest(FrozenTests) |
56 | 56 |
57 if __name__ == "__main__": | 57 if __name__ == "__main__": |
58 test_main() | 58 test_main() |
LEFT | RIGHT |