From 66e1a254a19c0c95216d54e64c5c2171e5880ed9 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 1 Aug 2001 19:38:56 +0000 Subject: [PATCH] Rewritten version of Finn Bock's SF patch #446907 (Allow jython to complete test_import). --- Lib/test/test_import.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 5419b5af7f7..0f9841c5b88 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -19,8 +19,11 @@ import double_const # don't blink -- that *was* the test sys.path.insert(0, os.curdir) source = TESTFN + ".py" -pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" +if sys.platform.endswith('java'): + pyc = TESTFN + "$py.class" +else: + pyc = TESTFN + ".pyc" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file"