/opt/cloudlinux/venv/lib/python3.11/site-packages/pyflakes/test
""" Tests for detecting redefinition of builtins. """ from pyflakes import messages as m from pyflakes.test.harness import TestCase class TestBuiltins(TestCase): def test_builtin_unbound_local(self): self.flakes(''' def foo(): a = range(1, 10) range = a return range foo() print(range) ''', m.UndefinedLocal) def test_global_shadowing_builtin(self): self.flakes(''' def f(): global range range = None print(range) f() ''')
.
Edit
..
Edit
__init__.py
Edit
__pycache__
Edit
harness.py
Edit
test_api.py
Edit
test_builtin.py
Edit
test_checker.py
Edit
test_code_segment.py
Edit
test_dict.py
Edit
test_doctests.py
Edit
test_imports.py
Edit
test_is_literal.py
Edit
test_match.py
Edit
test_other.py
Edit
test_type_annotations.py
Edit
test_undefined_names.py
Edit