summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2019-02-13 10:25:01 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2019-02-13 10:25:01 +0100
commit11403e0a3998eae1b27176ece815aac3af6b38cb (patch)
tree646a3588e792d74632b587bc710c5bea79cd5b55
parent612b87a3b3eaa6e862198c99d120e492cbfa19d9 (diff)
downloadpylint-git-11403e0a3998eae1b27176ece815aac3af6b38cb.tar.gz
Add test case for #2553
-rw-r--r--pylint/test/functional/member_checks_inference_improvements.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pylint/test/functional/member_checks_inference_improvements.py b/pylint/test/functional/member_checks_inference_improvements.py
new file mode 100644
index 000000000..6eefa7958
--- /dev/null
+++ b/pylint/test/functional/member_checks_inference_improvements.py
@@ -0,0 +1,11 @@
+# pylint: disable=missing-docstring
+
+
+def test_oserror_has_strerror():
+ # https://github.com/PyCQA/pylint/issues/2553
+ try:
+ raise OSError()
+ except OSError as exc:
+ if exc.strerror is not None:
+ return exc.strerror.lower()
+ return None