Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: a9917bce4123ae1cf135d2a114e947cda4d4ee35 authored by cvs2svn on 28 September 2005, 03:38:39 UTC
This commit was manufactured by cvs2svn to create tag 'r242'.
Tip revision: a9917bc
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