make sure the name of the exception is added in the scope of the exception - fixes #10

This commit is contained in:
Tarek Ziade 2012-02-21 10:43:16 +01:00
parent b1690f818d
commit 1003eeabe8
2 changed files with 22 additions and 2 deletions

View 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)