[Python-checkins] r52526 - python/trunk/Lib/test/test_grammar.py
georg.brandl
python-checkins at python.org
Sun Oct 29 10:18:01 CET 2006
Author: georg.brandl
Date: Sun Oct 29 10:18:00 2006
New Revision: 52526
Modified:
python/trunk/Lib/test/test_grammar.py
Log:
Test assert if __debug__ is true.
Modified: python/trunk/Lib/test/test_grammar.py
==============================================================================
--- python/trunk/Lib/test/test_grammar.py (original)
+++ python/trunk/Lib/test/test_grammar.py Sun Oct 29 10:18:00 2006
@@ -544,10 +544,9 @@
assert 0, "msg"
except AssertionError, e:
self.assertEquals(e.args[0], "msg")
- # 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")
+ else:
+ if __debug__:
+ self.fail("AssertionError not raised by assert 0")
### compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
# Tested below
More information about the Python-checkins
mailing list