source: vendor/python/2.5/Lib/test/test_frozen.py

Last change on this file was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 663 bytes
Line 
1# Test the frozen module defined in frozen.c.
2
3from test.test_support import TestFailed
4import sys, os
5
6try:
7 import __hello__
8except ImportError, x:
9 raise TestFailed, "import __hello__ failed:" + str(x)
10
11try:
12 import __phello__
13except ImportError, x:
14 raise TestFailed, "import __phello__ failed:" + str(x)
15
16try:
17 import __phello__.spam
18except ImportError, x:
19 raise TestFailed, "import __phello__.spam failed:" + str(x)
20
21if sys.platform != "mac": # On the Mac this import does succeed.
22 try:
23 import __phello__.foo
24 except ImportError:
25 pass
26 else:
27 raise TestFailed, "import __phello__.foo should have failed"
Note: See TracBrowser for help on using the repository browser.