blob: 8b121d38d8fba4d76b5ca8c17aa142791424932d [file] [log] [blame]
Guido van Rossum4114a4a2001-10-18 18:49:37 +00001# Test the frozen module defined in frozen.c.
2
Barry Warsaw408b6d32002-07-30 23:27:12 +00003from test.test_support import TestFailed
Guido van Rossum4114a4a2001-10-18 18:49:37 +00004import sys, os
5
6try:
7 import __hello__
8except ImportError, x:
Finn Bock218c5f92002-11-01 11:33:00 +00009 raise TestFailed, "import __hello__ failed:" + str(x)
Guido van Rossum4114a4a2001-10-18 18:49:37 +000010
11try:
12 import __phello__
13except ImportError, x:
Finn Bock218c5f92002-11-01 11:33:00 +000014 raise TestFailed, "import __phello__ failed:" + str(x)
Guido van Rossum4114a4a2001-10-18 18:49:37 +000015
16try:
17 import __phello__.spam
18except ImportError, x:
Finn Bock218c5f92002-11-01 11:33:00 +000019 raise TestFailed, "import __phello__.spam failed:" + str(x)
Guido van Rossum4114a4a2001-10-18 18:49:37 +000020
Jack Jansen2918ae82003-01-08 16:30:54 +000021if 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"