Skip to content

Commit 94540b2

Browse files
authored
Merge branch 'main' into dana/fork-branch-names
2 parents b60718f + 65210ba commit 94540b2

2 files changed

Lines changed: 3 additions & 37 deletions

File tree

codecov_cli/commands/labelanalysis.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,16 @@
5858
"--dry-run",
5959
"dry_run",
6060
help=(
61-
"Print list of tests to run AND tests skipped (and options that need to be added to the test runner) to stdout. "
62-
+ "Also prints the same information in JSON format. "
63-
+ "JSON will have keys 'ats_tests_to_run', 'ats_tests_to_skip' and 'runner_options'. "
64-
+ "List of tests to run is prefixed with ATS_TESTS_TO_RUN= "
65-
+ "List of tests to skip is prefixed with ATS_TESTS_TO_SKIP="
61+
"Print list of tests to run AND tests skipped AND options that need to be added to the test runner to stdout. "
62+
+ "Choose format with --dry-run-format option. Default is JSON. "
6663
),
6764
is_flag=True,
6865
)
6966
@click.option(
7067
"--dry-run-format",
7168
"dry_run_format",
7269
type=click.Choice(["json", "space-separated-list"]),
70+
help="Format in which --dry-run data is printed. Default is JSON.",
7371
default="json",
7472
)
7573
@click.pass_context

tests/commands/test_invoke_labelanalysis.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -171,38 +171,6 @@ def test__dry_run_space_separated_list_output(self):
171171

172172

173173
class TestLabelAnalysisCommand(object):
174-
def test_labelanalysis_help(self, mocker, fake_ci_provider):
175-
mocker.patch("codecov_cli.main.get_ci_adapter", return_value=fake_ci_provider)
176-
runner = CliRunner()
177-
178-
result = runner.invoke(cli, ["label-analysis", "--help"], obj={})
179-
assert result.exit_code == 0
180-
print(result.output)
181-
assert result.output.split("\n") == [
182-
"Usage: cli label-analysis [OPTIONS]",
183-
"",
184-
"Options:",
185-
" --token TEXT The static analysis token (NOT the same token",
186-
" as upload) [required]",
187-
" --head-sha TEXT Commit SHA (with 40 chars) [required]",
188-
" --base-sha TEXT Commit SHA (with 40 chars) [required]",
189-
" --runner-name, --runner TEXT Runner to use",
190-
" --max-wait-time INTEGER Max time (in seconds) to wait for the label",
191-
" analysis result before falling back to running",
192-
" all tests. Default is to wait forever.",
193-
" --dry-run Print list of tests to run AND tests skipped",
194-
" (and options that need to be added to the test",
195-
" runner) to stdout. Also prints the same",
196-
" information in JSON format. JSON will have",
197-
" keys 'ats_tests_to_run', 'ats_tests_to_skip'",
198-
" and 'runner_options'. List of tests to run is",
199-
" prefixed with ATS_TESTS_TO_RUN= List of tests",
200-
" to skip is prefixed with ATS_TESTS_TO_SKIP=",
201-
" --dry-run-format [json|space-separated-list]",
202-
" -h, --help Show this message and exit.",
203-
"",
204-
]
205-
206174
def test_invoke_label_analysis_missing_token(self, mocker, fake_ci_provider):
207175
mocker.patch("codecov_cli.main.get_ci_adapter", return_value=fake_ci_provider)
208176
runner = CliRunner()

0 commit comments

Comments
 (0)