summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2014-01-03 12:56:06 +0200
committercpopa <devnull@localhost>2014-01-03 12:56:06 +0200
commitd0c4b03f255d6960f9ae4078e8fd24ff22b96d92 (patch)
tree2b9f61cd865ac833c0e71bc57a421356da1e2b87
parent74235c75b27806b639cdde8b0df81d916d843f0d (diff)
downloadpylint-d0c4b03f255d6960f9ae4078e8fd24ff22b96d92.tar.gz
Add new test case for false positive prevention.
-rw-r--r--test/input/func_bad_exception_context_py30.py4
-rw-r--r--test/messages/func_bad_exception_context_py30.txt4
2 files changed, 5 insertions, 3 deletions
diff --git a/test/input/func_bad_exception_context_py30.py b/test/input/func_bad_exception_context_py30.py
index b520e68..df4df20 100644
--- a/test/input/func_bad_exception_context_py30.py
+++ b/test/input/func_bad_exception_context_py30.py
@@ -2,6 +2,8 @@
# pylint: disable=unreachable
+import socket
+
__revision__ = 0
class ExceptionSubclass(Exception):
@@ -14,4 +16,4 @@ def test():
raise IndexError from ZeroDivisionError
raise IndexError from object()
raise IndexError from ExceptionSubclass
-
+ raise IndexError from socket.error
diff --git a/test/messages/func_bad_exception_context_py30.txt b/test/messages/func_bad_exception_context_py30.txt
index 0a4b3ec..06e6525 100644
--- a/test/messages/func_bad_exception_context_py30.txt
+++ b/test/messages/func_bad_exception_context_py30.txt
@@ -1,2 +1,2 @@
-E: 12:test: Exception context set to something which is not an exception, nor None
-E: 15:test: Exception context set to something which is not an exception, nor None \ No newline at end of file
+E: 14:test: Exception context set to something which is not an exception, nor None
+E: 17:test: Exception context set to something which is not an exception, nor None \ No newline at end of file