summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/input/func_all_undefined.py8
-rw-r--r--test/input/func_noerror_all_no_inference.py14
-rw-r--r--test/messages/func_all_undefined.txt1
3 files changed, 23 insertions, 0 deletions
diff --git a/test/input/func_all_undefined.py b/test/input/func_all_undefined.py
new file mode 100644
index 0000000..4dd167c
--- /dev/null
+++ b/test/input/func_all_undefined.py
@@ -0,0 +1,8 @@
+"""Test that non-inferable __all__ variables do not make PyLint crash.
+
+"""
+# pylint: disable=R0903,R0201,W0612
+
+__revision__ = 0
+
+__all__ = [SomeUndefinedName]
diff --git a/test/input/func_noerror_all_no_inference.py b/test/input/func_noerror_all_no_inference.py
new file mode 100644
index 0000000..2d2062d
--- /dev/null
+++ b/test/input/func_noerror_all_no_inference.py
@@ -0,0 +1,14 @@
+"""Test that non-inferable __all__ variables do not make PyLint crash.
+
+"""
+# pylint: disable=R0903,R0201,W0612
+
+__revision__ = 0
+
+__all__ = sorted([
+ 'Dummy',
+ 'NonExistant',
+ 'path',
+ 'func',
+ 'inner',
+ 'InnerKlass'])
diff --git a/test/messages/func_all_undefined.txt b/test/messages/func_all_undefined.txt
new file mode 100644
index 0000000..f4170f2
--- /dev/null
+++ b/test/messages/func_all_undefined.txt
@@ -0,0 +1 @@
+E: 8: Undefined variable 'SomeUndefinedName'