]> crepu.dev Git - config.git/blob - djavu-asus/elpy/rpc-venv/lib/python3.11/site-packages/pyflakes/test/test_builtin.py
Configuracion en desarrollo PC pega
[config.git] / djavu-asus / elpy / rpc-venv / lib / python3.11 / site-packages / pyflakes / test / test_builtin.py
1 """
2 Tests for detecting redefinition of builtins.
3 """
4 from pyflakes import messages as m
5 from pyflakes.test.harness import TestCase
6
7
8 class TestBuiltins(TestCase):
9
10 def test_builtin_unbound_local(self):
11 self.flakes('''
12 def foo():
13 a = range(1, 10)
14 range = a
15 return range
16
17 foo()
18
19 print(range)
20 ''', m.UndefinedLocal)
21
22 def test_global_shadowing_builtin(self):
23 self.flakes('''
24 def f():
25 global range
26 range = None
27 print(range)
28
29 f()
30 ''')