mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-20 09:55:53 +00:00
Refactor testing
This commit is contained in:
25
benchmark/tests/scripts/Be_Report_test.py
Normal file
25
benchmark/tests/scripts/Be_Report_test.py
Normal 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")
|
Reference in New Issue
Block a user