diff options
Diffstat (limited to 'tests/functional/d/duplicate_except.py')
| -rw-r--r-- | tests/functional/d/duplicate_except.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/functional/d/duplicate_except.py b/tests/functional/d/duplicate_except.py new file mode 100644 index 000000000..c68cf7a24 --- /dev/null +++ b/tests/functional/d/duplicate_except.py @@ -0,0 +1,12 @@ +"""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 |
