make test_grammar pass with python -O

This commit is contained in:
Georg Brandl 2006-10-28 20:25:09 +00:00
parent 35692a0c0e
commit b21e0815bf
1 changed files with 4 additions and 2 deletions

View File

@ -544,8 +544,10 @@ hello world
assert 0, "msg"
except AssertionError, e:
self.assertEquals(e.args[0], "msg")
else:
self.fail("AssertionError not raised by assert 0")
# we can not expect an assertion error to be raised
# if the tests are run in an optimized python
#else:
# self.fail("AssertionError not raised by assert 0")
### compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
# Tested below