summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2012-05-28 00:44:20 +0200
committerFlorent Xicluna <florent.xicluna@gmail.com>2012-05-28 00:44:20 +0200
commitb04975dc71d69721898ff9676384fc37f59673f8 (patch)
tree098a8b18c8f577425e786e8401220ac3daa5d6d3 /testsuite
parent33cf818f8729c011d4090ff2ea4a79e07a5312ae (diff)
downloadpep8-b04975dc71d69721898ff9676384fc37f59673f8.tar.gz
Add checks E711, E712 and E721. Closes #46 and #47.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/E71.py9
-rw-r--r--testsuite/E72.py27
2 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/E71.py b/testsuite/E71.py
new file mode 100644
index 0000000..645d2d7
--- /dev/null
+++ b/testsuite/E71.py
@@ -0,0 +1,9 @@
+#: E712
+if res == True:
+ pass
+#: E712
+if res != False:
+ pass
+#: E711
+if res == None:
+ pass
diff --git a/testsuite/E72.py b/testsuite/E72.py
new file mode 100644
index 0000000..da041af
--- /dev/null
+++ b/testsuite/E72.py
@@ -0,0 +1,27 @@
+#: E721
+if type(res) == type(42):
+ pass
+#: E721
+if type(res) != type(""):
+ pass
+#: E721
+import types
+
+if res == types.IntType:
+ pass
+#: E721
+import types
+
+if type(res) is not types.ListType:
+ pass
+#: Okay
+import types
+
+if isinstance(res, int):
+ pass
+if isinstance(res, str):
+ pass
+if isinstance(res, types.MethodType):
+ pass
+if type(a) != type(b) or type(a) == type(ccc):
+ pass