From a32a827654910e26f69f344d5da6282066dd866c Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Fri, 28 Jun 2024 17:57:20 +0200 Subject: [PATCH] add test --- tests/test_cmd_test_reports.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_cmd_test_reports.py b/tests/test_cmd_test_reports.py index f2bdcd987..2ba943797 100644 --- a/tests/test_cmd_test_reports.py +++ b/tests/test_cmd_test_reports.py @@ -20,3 +20,20 @@ def test_allure(self): assert os.path.exists(results_path) assert os.path.isdir(results_path) assert len(os.listdir(results_path)) + + def test_markdown(self): + with self._isolate() as f: + json_path = os.path.join(TEST_DATA_DIR, "issue381.json") + results_path = os.path.join(f, "minimal_markdown_results") + self._check_exit_code(["test_reports", "--test_output_minimal_markdown", results_path, json_path], exit_code=0) + assert os.path.exists(results_path) + assert os.path.isdir(results_path) + assert len(os.listdir(results_path)) + + minimal_results_path = os.path.join(f, "minimal_markdown_results") + self._check_exit_code(["test_reports", "--test_output_minimal_markdown", minimal_results_path, json_path], exit_code=0) + assert os.path.exists(minimal_results_path) + assert os.path.isdir(minimal_results_path) + assert len(os.listdir(minimal_results_path)) + + assert os.path.getsize(minimal_markdown_results) < os.path.getsize(markdown_results)