2001-10-18 15:49:37 -03:00
|
|
|
# Test the frozen module defined in frozen.c.
|
|
|
|
|
2002-07-30 20:27:12 -03:00
|
|
|
from test.test_support import TestFailed
|
2001-10-18 15:49:37 -03:00
|
|
|
import sys, os
|
|
|
|
|
|
|
|
try:
|
|
|
|
import __hello__
|
|
|
|
except ImportError, x:
|
|
|
|
raise TestFailed, "import __hello__ failed:", x
|
|
|
|
|
|
|
|
try:
|
|
|
|
import __phello__
|
|
|
|
except ImportError, x:
|
|
|
|
raise TestFailed, "import __phello__ failed:", x
|
|
|
|
|
|
|
|
try:
|
|
|
|
import __phello__.spam
|
|
|
|
except ImportError, x:
|
|
|
|
raise TestFailed, "import __phello__.spam failed:", x
|
|
|
|
|
|
|
|
try:
|
|
|
|
import __phello__.foo
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
raise TestFailed, "import __phello__.foo should have failed"
|