mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 05:26:53 +00:00
make sure the name of the exception is added in the scope of the exception - fixes #10
This commit is contained in:
parent
b1690f818d
commit
1003eeabe8
2 changed files with 22 additions and 2 deletions
17
flake8/tests/test_flakes.py
Normal file
17
flake8/tests/test_flakes.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from unittest import TestCase
|
||||
from flake8.pyflakes import check
|
||||
|
||||
|
||||
code = """
|
||||
try:
|
||||
pass
|
||||
except ValueError as err:
|
||||
print(err)
|
||||
"""
|
||||
|
||||
|
||||
class TestFlake(TestCase):
|
||||
|
||||
def test_exception(self):
|
||||
warnings = check(code)
|
||||
self.assertEqual(warnings, 0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue