예제 #1
0
    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)
예제 #2
0
    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()
예제 #3
0
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
예제 #4
0
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
예제 #5
0
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"