From 48a928e6ca13eeaec902e77e5efd1c884c65bd5f Mon Sep 17 00:00:00 2001 From: Rohini Gopal Date: Fri, 9 Jul 2021 12:59:49 +0530 Subject: [PATCH] added test to validate when plot_type is None --- tests/test_cli.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index a496be6..85fa504 100755 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -45,7 +45,6 @@ def test_cli_lattice(): format_error = "Please specify output file format using --format" assert format_error in result.output - def test_cli_stream(): with TemporaryDirectory() as tempdir: infile = os.path.join(testdir, "budget.pdf") @@ -181,3 +180,9 @@ def test_cli_quiet(): cli, ["--quiet", "--format", "csv", "--output", outfile, "stream", infile] ) assert "No tables found on page-1" not in result.output + +def test_cli_lattice_plot_type(): + with TemporaryDirectory() as tempdir: + runner = CliRunner() + result = runner.invoke(cli, ["--plot_type", ""]) + assert result.exit_code != 0, f"Output: {result.output}" \ No newline at end of file