Total Complexity | 3 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """ |
||
2 | :Copyright: 2007-2021 Jochen Kupperschmidt |
||
3 | :License: MIT, see LICENSE for details. |
||
4 | """ |
||
5 | |||
6 | from pathlib import Path |
||
7 | |||
8 | import pytest |
||
9 | |||
10 | from syslog2irc.cli import parse_args |
||
11 | |||
12 | |||
13 | def test_parse_args_without_args(): |
||
14 | with pytest.raises(SystemExit): |
||
15 | actual = parse_args([]) |
||
16 | |||
17 | |||
18 | def test_parse_args_with_config_filename_arg(): |
||
19 | actual = parse_args(['config.toml']) |
||
20 | |||
21 | assert actual.config_filename == Path('config.toml') |
||
22 |