mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 20:26:53 +00:00
17 lines
265 B
Python
17 lines
265 B
Python
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)
|