python-by-example-150-chall.../venv/lib/python3.6/site-packages/pylint/test/functional/duplicate_except.py
2019-08-04 15:26:35 +03:00

13 lines
290 B
Python

"""Test for duplicate-check."""
def main():
"""The second ValueError should be flagged."""
try:
raise ValueError('test')
except ValueError:
return 1
except ValueError: # [duplicate-except]
return 2
except (OSError, TypeError):
return 3