def show(self, short: bool = False, keys_limit: int = 10): from arche.report import Report Report.write_summary(self) Report.write_rule_details(self, short=short, keys_limit=keys_limit) for f in self.figures: pio.show(f)
def show(self, short: bool = False, keys_limit: int = 10): from arche.report import Report IPython.display.clear_output() Report.write_summary(self) Report.write_rule_details(self, short=short, keys_limit=keys_limit) for f in self.figures: f.show()
def test_write_rule_details(capsys, message, expected_details): outcome = create_result("rule name here", message) Report.write_rule_details(outcome) assert capsys.readouterr().out == expected_details
def test_write_none_rule_details(capsys): outcome = create_result("rule name here", {Level.INFO: [("summary", )]}) Report.write_rule_details(outcome) assert not capsys.readouterr().out
def test_write_rule_details(capsys, message, expected_details): outcome = create_result("rule name here", message) Report.write_rule_details(outcome) assert capsys.readouterr( ).out == f"{{'text/markdown': '{expected_details}'}}\n"