# HG changeset patch # User Thomas Arendsen Hein # Date 2011-10-17 12:27:34 # Node ID 42e71f5852eea5527e1d6aabe48ac7cb42a16366 # Parent ebeac9c414562d0b3aaa8f353b4dcd20aac7cea8 test-check-code.t: test matching try/except/finally introduced in aeeb2afcdc25 diff --git a/tests/test-check-code.t b/tests/test-check-code.t --- a/tests/test-check-code.t +++ b/tests/test-check-code.t @@ -26,6 +26,23 @@ > # Do not complain about our own definition > def any(x): > pass + > + > # try/except/finally block does not exist in Python 2.4 + > try: + > pass + > except StandardError, inst: + > pass + > finally: + > pass + > + > # nested try/finally+try/except is allowed + > try: + > try: + > pass + > except StandardError, inst: + > pass + > finally: + > pass > EOF $ cat > classstyle.py < class newstyle_class(object): @@ -64,6 +81,9 @@ ./non-py24.py:4: > y = format(x) any/all/format not available in Python 2.4 + ./non-py24.py:11: + > try: + no try/except/finally in Py2.4 ./classstyle.py:4: > class oldstyle_class: old-style class, use class foo(object)