Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 84d6457fe4b92730de50847cb238f942cd04937a authored by Georg Brandl on 05 March 2011, 13:55:23 UTC
Close 2.2 branch.
Tip revision: 84d6457
test_frozen.py
# Test the frozen module defined in frozen.c.

from test_support import TestFailed
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"
back to top