summaryrefslogtreecommitdiff
path: root/tests/functional/l
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2020-12-31 11:10:10 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2020-12-31 11:48:37 +0100
commitf95bbacac8b179bbfeedb1efd7954d35eb2a0e5a (patch)
treef253f725fb449bfa7d226af5749b0ba1c6a2ad83 /tests/functional/l
parent76a3843d0b2018c1ab05f2989bb6a8e614926ce7 (diff)
downloadpylint-git-f95bbacac8b179bbfeedb1efd7954d35eb2a0e5a.tar.gz
Remove test for function inference as astroid is not ready yet
Diffstat (limited to 'tests/functional/l')
-rw-r--r--tests/functional/l/len_checks.py22
-rw-r--r--tests/functional/l/len_checks.txt3
2 files changed, 12 insertions, 13 deletions
diff --git a/tests/functional/l/len_checks.py b/tests/functional/l/len_checks.py
index 6330d307c..eb10b6a3b 100644
--- a/tests/functional/l/len_checks.py
+++ b/tests/functional/l/len_checks.py
@@ -158,18 +158,20 @@ def github_issue_1879():
return 1
return 2
- def function_returning_generator(r):
- for i in [r, 1, 2, 3]:
- yield i
+ # def function_returning_generator(r):
+ # for i in [r, 1, 2, 3]:
+ # yield i
- def function_returning_comprehension(r):
- return [x+1 for x in [r, 1, 2, 3]]
+ # def function_returning_comprehension(r):
+ # return [x+1 for x in [r, 1, 2, 3]]
- def function_returning_function(r):
- return function_returning_generator(r)
+ # def function_returning_function(r):
+ # return function_returning_generator(r)
assert len(function_returning_list(z)) # [len-as-condition]
assert len(function_returning_int(z))
- assert len(function_returning_generator(z)) # [len-as-condition]
- assert len(function_returning_comprehension(z)) # [len-as-condition]
- assert len(function_returning_function(z)) # [len-as-condition]
+ # This should raise a len-as-conditions once astroid can infer it
+ # See https://github.com/PyCQA/pylint/pull/3821#issuecomment-743771514
+ # assert len(function_returning_generator(z))
+ # assert len(function_returning_comprehension(z))
+ # assert len(function_returning_function(z))
diff --git a/tests/functional/l/len_checks.txt b/tests/functional/l/len_checks.txt
index c149fa39c..3a039afca 100644
--- a/tests/functional/l/len_checks.txt
+++ b/tests/functional/l/len_checks.txt
@@ -20,7 +20,4 @@ len-as-condition:127:github_issue_1879:Do not use `len(SEQUENCE)` without compar
len-as-condition:128:github_issue_1879:Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty
len-as-condition:129:github_issue_1879:Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty
len-as-condition:130:github_issue_1879:Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty
-len-as-condition:131:github_issue_1879:Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty
-len-as-condition:161:github_issue_1879:Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty
-len-as-condition:170:github_issue_1879:Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty
len-as-condition:171:github_issue_1879:Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty