File tree Expand file tree Collapse file tree 3 files changed +35
-4
lines changed
Expand file tree Collapse file tree 3 files changed +35
-4
lines changed Original file line number Diff line number Diff line change 11# stdlib
2- import re
32import sys
4- from typing import Optional
53
64# 3rd party
75import pytest
86from coincidence .regressions import AdvancedFileRegressionFixture
9- from consolekit .testing import CliRunner
7+ from consolekit .testing import CliRunner , _click_major
108from domdf_python_tools .words import LF
119
1210# this package
1311import formate
1412from formate .__main__ import main
1513
1614
17- def test_help (advanced_file_regression : AdvancedFileRegressionFixture ):
15+ @pytest .mark .parametrize (
16+ "click_version" ,
17+ [
18+ pytest .param (
19+ '7' ,
20+ marks = pytest .mark .skipif (_click_major == 8 , reason = "Output differs on click 8" ),
21+ ),
22+ pytest .param (
23+ '8' ,
24+ marks = pytest .mark .skipif (_click_major != 8 , reason = "Output differs on click 8" ),
25+ ),
26+ ]
27+ )
28+ def test_help (
29+ advanced_file_regression : AdvancedFileRegressionFixture ,
30+ click_version : str ,
31+ ):
1832
1933 runner = CliRunner ()
2034
Original file line number Diff line number Diff line change 1+ Usage: main [OPTIONS] [FILENAME]...
2+
3+ Reformat the given Python source files.
4+
5+ Options:
6+ -c, --config-file TEXT The path or filename of the TOML configuration file to
7+ use. If a filename is given it is searched for in the
8+ current and parent directories. [default:
9+ formate.toml]
10+
11+ -e, --exclude PATTERN Patterns for files to exclude from formatting.
12+ -v, --verbose Show verbose output.
13+ --colour / --no-colour Whether to use coloured output.
14+ -T, --traceback Show the complete traceback on error.
15+ --diff Show a diff of changes made
16+ --version Show the version and exit.
17+ -h, --help Show this message and exit.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments