Mercurial > hg
changeset 15285:42e71f5852ee stable
test-check-code.t: test matching try/except/finally introduced in aeeb2afcdc25
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 17 Oct 2011 14:27:34 +0200 |
parents | ebeac9c41456 |
children | 4be845e3932c |
files | tests/test-check-code.t |
diffstat | 1 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-check-code.t Sun Oct 16 22:15:43 2011 -0500 +++ b/tests/test-check-code.t Mon Oct 17 14:27:34 2011 +0200 @@ -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 <<EOF > 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)