summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gilman <davidgilman1@gmail.com>2021-01-01 15:31:50 -0500
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-16 07:53:15 +0100
commit33f116601aae4fe0aafb74cc30e0dc10c23c0b68 (patch)
treed823433019a3a350c8c129e1de403e4f9caa42c9
parentca689caef1ebc4e07885d0db726685699a2b0f57 (diff)
downloadpylint-git-33f116601aae4fe0aafb74cc30e0dc10c23c0b68.tar.gz
Re-add accidentally removed py3k unittest
-rw-r--r--tests/checkers/unittest_python3.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/checkers/unittest_python3.py b/tests/checkers/unittest_python3.py
index 031685bbf..36bf44719 100644
--- a/tests/checkers/unittest_python3.py
+++ b/tests/checkers/unittest_python3.py
@@ -45,6 +45,29 @@ class TestPython3Checker(testutils.CheckerTestCase):
with self.assertAddsMessages(testutils.Message(message, node=node)):
self.checker.visit_name(node)
+ def test_bad_builtins(self):
+ builtins = [
+ "apply",
+ "buffer",
+ "cmp",
+ "coerce",
+ "execfile",
+ "file",
+ "input",
+ "intern",
+ "long",
+ "raw_input",
+ "round",
+ "reduce",
+ "StandardError",
+ "unichr",
+ "unicode",
+ "xrange",
+ "reload",
+ ]
+ for builtin in builtins:
+ self.check_bad_builtin(builtin)
+
def as_iterable_in_for_loop_test(self, fxn):
code = "for x in {}(): pass".format(fxn)
module = astroid.parse(code)