blob: f1299f0d992e6aa4578d1aebad6271be0fa56fd8 [file] [log] [blame]
Guido van Rossum4114a4a2001-10-18 18:49:37 +00001# Test the frozen module defined in frozen.c.
Guido van Rossum4f72a782006-10-27 23:31:49 +00002# Currently test_frozen fails:
3# Implementing pep3102(keyword only argument) needs changes in
4# code object, which needs modification to marshal.
5# However, to regenerate hard-coded marshal data in frozen.c,
6# we need to run Tools/freeze/freeze.py, which currently doesn't work
7# because Lib/modulefinder.py cannot handle relative module import
8# This test will keep failing until Lib/modulefinder.py is fixed
Guido van Rossum4114a4a2001-10-18 18:49:37 +00009
Barry Warsaw408b6d32002-07-30 23:27:12 +000010from test.test_support import TestFailed
Guido van Rossum4114a4a2001-10-18 18:49:37 +000011import sys, os
12
Martin v. Löwis5b222132007-06-10 09:51:05 +000013raise TestFailed, "test currently causes assertion in debug mode"
14
Guido van Rossum4114a4a2001-10-18 18:49:37 +000015try:
16 import __hello__
Guido van Rossumb940e112007-01-10 16:19:56 +000017except ImportError as x:
Finn Bock218c5f92002-11-01 11:33:00 +000018 raise TestFailed, "import __hello__ failed:" + str(x)
Guido van Rossum4114a4a2001-10-18 18:49:37 +000019
20try:
21 import __phello__
Guido van Rossumb940e112007-01-10 16:19:56 +000022except ImportError as x:
Finn Bock218c5f92002-11-01 11:33:00 +000023 raise TestFailed, "import __phello__ failed:" + str(x)
Guido van Rossum4114a4a2001-10-18 18:49:37 +000024
25try:
26 import __phello__.spam
Guido van Rossumb940e112007-01-10 16:19:56 +000027except ImportError as x:
Finn Bock218c5f92002-11-01 11:33:00 +000028 raise TestFailed, "import __phello__.spam failed:" + str(x)
Guido van Rossum4114a4a2001-10-18 18:49:37 +000029
Jack Jansen2918ae82003-01-08 16:30:54 +000030if sys.platform != "mac": # On the Mac this import does succeed.
31 try:
32 import __phello__.foo
33 except ImportError:
34 pass
35 else:
36 raise TestFailed, "import __phello__.foo should have failed"