mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-15 15:35:52 +00:00
test: 🧪 Update a flaky test due to different console width in diff envs
This commit is contained in:
@@ -111,7 +111,16 @@ class BeReportTest(TestBase):
|
||||
def test_be_report_without_subcommand(self):
|
||||
stdout, stderr = self.execute_script("be_report", "")
|
||||
self.assertEqual(stderr.getvalue(), "")
|
||||
self.check_output_file(stdout, "report_without_subcommand")
|
||||
self.maxDiff = None
|
||||
# Can't use check_output_file because of the width of the console
|
||||
# output is different in different environments
|
||||
file_name = "report_without_subcommand" + self.ext
|
||||
with open(os.path.join(self.test_files, file_name)) as f:
|
||||
expected = f.read()
|
||||
if expected == stdout.getvalue():
|
||||
self.assertEqual(stdout.getvalue(), expected)
|
||||
else:
|
||||
self.check_output_file(stdout, "report_without_subcommand2")
|
||||
|
||||
def test_be_report_excel_compared(self):
|
||||
file_name = "results_accuracy_STree_iMac27_2021-09-30_11:42:07_0.json"
|
||||
|
14
benchmark/tests/test_files/report_without_subcommand2.test
Normal file
14
benchmark/tests/test_files/report_without_subcommand2.test
Normal file
@@ -0,0 +1,14 @@
|
||||
usage: be_report [-h] {best,grid,file,datasets} ...
|
||||
|
||||
positional arguments:
|
||||
{best,grid,file,datasets}
|
||||
help for subcommand
|
||||
best Report best results obtained by any model/score. See
|
||||
be_build_best
|
||||
grid Report grid results obtained by any model/score. See
|
||||
be_build_grid
|
||||
file Report file results
|
||||
datasets Report datasets information
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
Reference in New Issue
Block a user