fix unit-test and new quality issues

This commit is contained in:
cclecle
2023-09-27 22:45:56 +01:00
parent f5b7931ed7
commit 529a3e9922
2 changed files with 2 additions and 6 deletions

View File

@@ -64,7 +64,7 @@ class cl_unit_test(cl_helper_withresults_base):
cov.stop()
cov.save()
cov.html_report(directory=str(CoverageReportPath))
cov.xml_report(outfile=(CoverageReportPath / f"{cls.CoverageReportName}.xml"))
cov.xml_report(outfile=str(CoverageReportPath / f"{cls.CoverageReportName}.xml"))
# computing results (Only if xml available)
if cls.enable_full_xml_export is True:

View File

@@ -30,12 +30,8 @@ class Test_main(unittest.TestCase):
self.assertNotEqual(chacha_cicd_helper.__version__, "?.?.?")
def test_help(self):
with redirect_stdout(StringIO()) as capted_stdout, redirect_stderr(StringIO()) as capted_stderr:
with self.assertRaises(SystemExit):
fct_main(["-h", "-pp", str(testdir_path.parent.resolve())])
print(capted_stdout.getvalue())
print(capted_stderr.getvalue())
self.assertIn("usage: chacha_cicd_helper", capted_stdout.getvalue())
self.assertIn(f"usage: {chacha_cicd_helper.__Name__}", capted_stdout.getvalue())
self.assertEqual(capted_stderr.getvalue(), "")