summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_future.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-04-18 01:19:28 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-04-18 01:19:28 (GMT)
commit3090694068670371cdbd5b1a3d3c5dbecc83835a (patch)
treedda4e675551edb2b0c07bd3e7f7d9c48d9ef7433 /Lib/test/test_future.py
parentbc41957d2b58dfaae24e8a996e3e7c4fe3b475dd (diff)
downloadcpython-3090694068670371cdbd5b1a3d3c5dbecc83835a.zip
cpython-3090694068670371cdbd5b1a3d3c5dbecc83835a.tar.gz
cpython-3090694068670371cdbd5b1a3d3c5dbecc83835a.tar.bz2
Fix compileall.py so that it fails on SyntaxErrors
The changes cause compilation failures in any file in the Python installation lib directory to cause the install to fail. It looks like compileall.py intended to behave this way, but a change to py_compile.py and a separate bug defeated it. Fixes SF bug #412436 This change affects the test suite, which contains several files that contain intentional errors. The solution is to extend compileall.py with the ability to skip compilation of selected files. In the test suite, rename nocaret.py and test_future[3..7].py to start with badsyntax_nocaret.py and badsyntax_future[3..7].py. Update the makefile to skip compilation of these files. Update the tests to use the name names for imports. NB compileall.py is changed so that compile_dir() returns success only if all recursive calls to compile_dir() also check success.
Diffstat (limited to 'Lib/test/test_future.py')
-rw-r--r--Lib/test/test_future.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py
index 1ffda5e..ba0763b 100644
--- a/Lib/test/test_future.py
+++ b/Lib/test/test_future.py
@@ -19,26 +19,26 @@ import test_future2
# The remaining tests should fail
try:
- import test_future3
+ import badsyntax_future3
except SyntaxError, msg:
check_error_location(str(msg))
try:
- import test_future4
+ import badsyntax_future4
except SyntaxError, msg:
check_error_location(str(msg))
try:
- import test_future5
+ import badsyntax_future5
except SyntaxError, msg:
check_error_location(str(msg))
try:
- import test_future6
+ import badsyntax_future6
except SyntaxError, msg:
check_error_location(str(msg))
try:
- import test_future7
+ import badsyntax_future7
except SyntaxError, msg:
check_error_location(str(msg))