Refactor testing

This commit is contained in:
2022-05-07 01:33:35 +02:00
parent 3b214773ff
commit df757fefcd
20 changed files with 92 additions and 63 deletions

View File

@@ -0,0 +1,25 @@
import os
from ..TestBase import TestBase
class BeReportTest(TestBase):
def setUp(self):
self.prepare_scripts_env()
def test_be_report(self):
file_name = os.path.join(
"results",
"results_accuracy_STree_iMac27_2021-09-30_11:42:07_0.json",
)
stdout, stderr = self.execute_script("be_report", ["-f", file_name])
self.assertEqual(stderr.getvalue(), "")
self.check_output_file(stdout, "report")
def test_be_report_compare(self):
file_name = "results_accuracy_STree_iMac27_2021-09-30_11:42:07_0.json"
stdout, stderr = self.execute_script(
"be_report",
["-f", file_name, "-c", "1"],
)
self.assertEqual(stderr.getvalue(), "")
self.check_output_file(stdout, "report_compared")