Anthony Sottile | 8f61529 | 2022-01-15 19:24:05 -0500 | [diff] [blame] | 1 | from __future__ import annotations |
| 2 | |
Anthony Sottile | b9cc9d7 | 2020-05-14 16:00:29 -0700 | [diff] [blame] | 3 | import pytest |
| 4 | |
| 5 | from pre_commit_hooks.removed import main |
| 6 | |
| 7 | |
| 8 | def test_always_fails(): |
| 9 | with pytest.raises(SystemExit) as excinfo: |
| 10 | main(( |
| 11 | 'autopep8-wrapper', 'autopep8', |
| 12 | 'https://github.com/pre-commit/mirrors-autopep8', |
Pedro Calleja | 926208f | 2020-05-18 21:27:24 -0500 | [diff] [blame] | 13 | '--foo', 'bar', |
Anthony Sottile | b9cc9d7 | 2020-05-14 16:00:29 -0700 | [diff] [blame] | 14 | )) |
| 15 | msg, = excinfo.value.args |
| 16 | assert msg == ( |
| 17 | '`autopep8-wrapper` has been removed -- ' |
| 18 | 'use `autopep8` from https://github.com/pre-commit/mirrors-autopep8' |
| 19 | ) |