PyXR

c:\python24\lib \ test \ test_frozen.py



0001 # Test the frozen module defined in frozen.c.
0002 
0003 from test.test_support import TestFailed
0004 import sys, os
0005 
0006 try:
0007     import __hello__
0008 except ImportError, x:
0009     raise TestFailed, "import __hello__ failed:" + str(x)
0010 
0011 try:
0012     import __phello__
0013 except ImportError, x:
0014     raise TestFailed, "import __phello__ failed:" + str(x)
0015 
0016 try:
0017     import __phello__.spam
0018 except ImportError, x:
0019     raise TestFailed, "import __phello__.spam failed:" + str(x)
0020 
0021 if sys.platform != "mac":  # On the Mac this import does succeed.
0022     try:
0023         import __phello__.foo
0024     except ImportError:
0025         pass
0026     else:
0027         raise TestFailed, "import __phello__.foo should have failed"
0028 

Generated by PyXR 0.9.4
SourceForge.net Logo