summaryrefslogtreecommitdiff
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-07-11 17:53:00 +0000
committerFred Drake <fdrake@acm.org>2000-07-11 17:53:00 +0000
commit171870e9c7660c24aaf1a0147835d082d7146006 (patch)
treeb7c0a0a1605f0d95b92131ddc21025f6f76c0300 /Lib/test/test_exceptions.py
parent3cacc954f69ff15461b45b028f39a11e1c54626e (diff)
downloadcpython-171870e9c7660c24aaf1a0147835d082d7146006.tar.gz
Create two new exceptions: IndentationError and TabError. These are
used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856.
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 7bc515c488..06861dfb30 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -86,6 +86,14 @@ r(SyntaxError)
try: exec '/\n'
except SyntaxError: pass
+r(IndentationError)
+
+r(TabError)
+# can only be tested under -tt, and is the only test for -tt
+#try: compile("try:\n\t1/0\n \t1/0\nfinally:\n pass\n", '<string>', 'exec')
+#except TabError: pass
+#else: raise TestFailed
+
r(SystemError)
print '(hard to reproduce)'