summaryrefslogtreecommitdiff
path: root/python/testData
diff options
context:
space:
mode:
Diffstat (limited to 'python/testData')
-rw-r--r--python/testData/inspections/PyCallingNonCallableInspection/callDictSubscriptionExpression.py4
-rw-r--r--python/testData/inspections/PyCallingNonCallableInspection/localCallableClass.py7
-rw-r--r--python/testData/inspections/PyUnresolvedReferencesInspection/OneUnsedOneMarked/a.py4
-rw-r--r--python/testData/inspections/PyUnresolvedReferencesInspection/OneUnsedOneMarked/library.py1
4 files changed, 16 insertions, 0 deletions
diff --git a/python/testData/inspections/PyCallingNonCallableInspection/callDictSubscriptionExpression.py b/python/testData/inspections/PyCallingNonCallableInspection/callDictSubscriptionExpression.py
new file mode 100644
index 000000000000..4c6d7657d59d
--- /dev/null
+++ b/python/testData/inspections/PyCallingNonCallableInspection/callDictSubscriptionExpression.py
@@ -0,0 +1,4 @@
+ops = {'and': all, 'or': any}
+op = ops['or']
+ops['and']()
+op()
diff --git a/python/testData/inspections/PyCallingNonCallableInspection/localCallableClass.py b/python/testData/inspections/PyCallingNonCallableInspection/localCallableClass.py
new file mode 100644
index 000000000000..de03229331e0
--- /dev/null
+++ b/python/testData/inspections/PyCallingNonCallableInspection/localCallableClass.py
@@ -0,0 +1,7 @@
+class Callable(object):
+ pass
+
+
+def f(g):
+ if callable(g):
+ g()
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/OneUnsedOneMarked/a.py b/python/testData/inspections/PyUnresolvedReferencesInspection/OneUnsedOneMarked/a.py
new file mode 100644
index 000000000000..baae7fc5fe65
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/OneUnsedOneMarked/a.py
@@ -0,0 +1,4 @@
+from library import foo,<error descr="Unresolved reference 'bar'">bar</error>
+
+
+print(foo) \ No newline at end of file
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/OneUnsedOneMarked/library.py b/python/testData/inspections/PyUnresolvedReferencesInspection/OneUnsedOneMarked/library.py
new file mode 100644
index 000000000000..048ea67a76d9
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/OneUnsedOneMarked/library.py
@@ -0,0 +1 @@
+foo = 0 \ No newline at end of file