Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 11a859d70dffc8da51d346dabd1fe6a635825ae5 authored by Martin v. Löwis on 28 May 2011, 11:58:36 UTC
r88840: Prepare for 2.5.6.
Tip revision: 11a859d
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