Skip to content

Commit be08dcf

Browse files
fix(ci): adapt tests to changes in click 8.20 (#1752)
Adapt the tests to changes introduced in click 8.20. The changes affect the stdout / stderr content (see [changelog](https://github.com/pallets/click/blob/main/CHANGES.rst#version-820)).
1 parent 1d4866e commit be08dcf

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

frictionless/console/__spec__/test_console.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def test_console():
1313
result = runner.invoke(console)
1414
assert result.exit_code == 2
15-
assert result.stdout.count("Usage")
15+
assert result.output.count("Usage")
1616

1717

1818
def test_console_version():
@@ -30,4 +30,4 @@ def test_console_help():
3030
def test_console_error_bad_command():
3131
result = runner.invoke(console, "bad")
3232
assert result.exit_code == 2
33-
assert result.stdout.count("No such command 'bad'")
33+
assert result.output.count("No such command 'bad'")

frictionless/console/commands/__spec__/test_summary.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ def test_console_summary_error_not_found():
1313
result = runner.invoke(console, "summary data/countriess.csv")
1414
assert result.exit_code == 1
1515
assert (
16-
result.stdout.count("[scheme-error]")
17-
and result.stdout.count("[Errno 2]")
18-
and result.stdout.count("data/countriess.csv")
16+
result.output.count("[scheme-error]")
17+
and result.output.count("[Errno 2]")
18+
and result.output.count("data/countriess.csv")
1919
)
2020

2121

2222
def test_console_summary_invalid():
2323
result = runner.invoke(console, "summary data/countries-invalid.yaml")
2424
assert result.exit_code == 1
25-
assert result.stdout.count(
25+
assert result.output.count(
2626
'Field is not valid: "required" should be set as "constraints.required"'
2727
)
2828

@@ -155,7 +155,7 @@ def test_console_summary_without_command(tmpdir):
155155
def test_console_summary_without_filepath():
156156
result = runner.invoke(console, "summary")
157157
assert result.exit_code == 1
158-
assert result.stdout.strip() == 'Providing "source" is required'
158+
assert result.output.strip() == 'Providing "source" is required'
159159

160160

161161
def test_console_summary_zipped_innerpath():

0 commit comments

Comments
 (0)