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 4, 2024
1 parent 8e1c189 commit 5e04971
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, ["--format", "csv", "--output", outfile, "stream", infile, "--margins", "1.5 0.5 0.8"]
)
assert result.exit_code == 0
assert result.output == "Found 1 tables\n"

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


def test_cli_password(testdir):
with TemporaryDirectory() as tempdir:
Expand Down

0 comments on commit 5e04971

Please sign in to comment.