home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 June / PCWorld_2005-06_cd.bin / software / vyzkuste / firewally / firewally.exe / framework-2.3.exe / test_frozen.py < prev    next >
Text File  |  2003-12-30  |  663b  |  28 lines

  1. # Test the frozen module defined in frozen.c.
  2.  
  3. from test.test_support import TestFailed
  4. import sys, os
  5.  
  6. try:
  7.     import __hello__
  8. except ImportError, x:
  9.     raise TestFailed, "import __hello__ failed:" + str(x)
  10.  
  11. try:
  12.     import __phello__
  13. except ImportError, x:
  14.     raise TestFailed, "import __phello__ failed:" + str(x)
  15.  
  16. try:
  17.     import __phello__.spam
  18. except ImportError, x:
  19.     raise TestFailed, "import __phello__.spam failed:" + str(x)
  20.  
  21. if 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"
  28.