tests/test-check-code.t
changeset 18183 e1caaeb5a2ed
parent 18180 c582a71457e5
child 18762 a91387a37f05
--- a/tests/test-check-code.t	Tue Jan 01 13:04:40 2013 -0600
+++ b/tests/test-check-code.t	Tue Jan 01 13:05:22 2013 -0600
@@ -110,6 +110,18 @@
    > class empty():
    class foo() not available in Python 2.4, use class foo(object)
   [1]
+  $ cat > python3-compat.py << EOF
+  > foo <> bar
+  > reduce(lambda a, b: a + b, [1, 2, 3, 4])
+  > EOF
+  $ "$check_code" python3-compat.py
+  python3-compat.py:1:
+   > foo <> bar
+   <> operator is not available in Python 3+, use !=
+  python3-compat.py:2:
+   > reduce(lambda a, b: a + b, [1, 2, 3, 4])
+   reduce is not available in Python 3+
+  [1]
 
   $ cat > is-op.py <<EOF
   > # is-operator comparing number or string literal