From efa4dd4b1edea7aacf38e10b95cf0f227b3af527 Mon Sep 17 00:00:00 2001 From: Nick Moore Date: Wed, 8 Nov 2023 12:14:25 +1100 Subject: [PATCH] forgot the actual test for the test --- tests/test_cmd.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/test_cmd.py diff --git a/tests/test_cmd.py b/tests/test_cmd.py new file mode 100644 index 0000000..93dee98 --- /dev/null +++ b/tests/test_cmd.py @@ -0,0 +1,17 @@ +import pytest +import csv + +from countess.core.cmd import main as countess_cmd + +expected_output=""""thing","foo","bar","baz","qux","number","zz" +"bar",10,2,1,4,232,0.08620689655172414 +"baz",11,3,2,1,565,0.0584070796460177 +"qux",12,9,8,7,999,0.10810810810810811 +""" + +def test_command_invocation(): + countess_cmd(["countess_cmd", "simple.ini"]) + + with open("tests/output.csv", "r") as fh: + output = fh.read() + assert output == expected_output