Skip to content

Commit

Permalink
Added tests for CLI stream margins option.
Browse files Browse the repository at this point in the history
  • Loading branch information
Niremizov-Omcode committed Sep 16, 2024
1 parent 4d2063e commit c52762e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ def test_cli_stream(testdir):
format_error = "Please specify output file format using --format"
assert format_error in result.output

result = runner.invoke(
cli, [ "--margins", "1.5", "0.5", "0.8", "--format", "csv", "--output", outfile, "stream", infile]
)
assert result.exit_code == 0
assert result.output == "Found 1 tables\n"

result = runner.invoke(
cli, ["--margins", "1.5", "0.5", "--format", "csv", "--output", outfile, "stream", infile]
)
output_error = "Error: Invalid value for '-M' / '--margins': '--format' is not a valid float."
assert output_error in result.output


@skip_on_windows
def test_cli_parallel(testdir):
Expand Down

0 comments on commit c52762e

Please sign in to comment.