Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: c26ef13d23bab6328b4f9164b4eb3619c754c45f authored by cvs2svn on 30 September 2003, 07:10:26 UTC
This commit was manufactured by cvs2svn to create tag 'r232c1'.
Tip revision: c26ef13
test_frozen.py
# Test the frozen module defined in frozen.c.

from test.test_support import TestFailed
import sys, os

try:
    import __hello__
except ImportError, x:
    raise TestFailed, "import __hello__ failed:" + str(x)

try:
    import __phello__
except ImportError, x:
    raise TestFailed, "import __phello__ failed:" + str(x)

try:
    import __phello__.spam
except ImportError, x:
    raise TestFailed, "import __phello__.spam failed:" + str(x)

if sys.platform != "mac":  # On the Mac this import does succeed.
    try:
        import __phello__.foo
    except ImportError:
        pass
    else:
        raise TestFailed, "import __phello__.foo should have failed"
back to top