mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-10 23:04:18 +00:00
more weird edge cases py2/3
This commit is contained in:
parent
ef4b069970
commit
fabd0fa801
2 changed files with 16 additions and 5 deletions
|
|
@ -13,18 +13,25 @@ code2 = """
|
|||
try:
|
||||
pass
|
||||
except ValueError:
|
||||
print(err)
|
||||
print("err")
|
||||
|
||||
try:
|
||||
pass
|
||||
except ValueError:
|
||||
print(err)
|
||||
print("err")
|
||||
"""
|
||||
|
||||
code3 = """
|
||||
try:
|
||||
pass
|
||||
except (ImportError, ValueError):
|
||||
print("err")
|
||||
"""
|
||||
|
||||
|
||||
class TestFlake(TestCase):
|
||||
|
||||
def test_exception(self):
|
||||
for c in (code, code2):
|
||||
for c in (code, code2, code3):
|
||||
warnings = check(code)
|
||||
self.assertEqual(warnings, 0)
|
||||
self.assertEqual(warnings, 0, code)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue