def dummy_test_plan_report_with_binary_asserts(): tg_2 = generate_dummy_testgroup() res = Result() res.equal(1, 1, "IGNORE THIS") res.equal(b"\xF2", b"\xf2", "IGNORE THIS") res.equal(b"\x00\xb1\xC1", b"\x00\xB2\xc2", "IGNORE THIS") btc_1 = TestCaseReport( name="binary_test_case_1", description="binary test case 1 description", entries=res.serialized_entries, ) btg_1 = TestGroupReport( name="Binary Test Group 2", description="Binary Test Group 1 description", category=ReportCategories.TESTGROUP, entries=[btc_1], tags={}, ) rep = TestReport( name="My Bin Plan", entries=[tg_2, btg_1], meta={"foobin": "bazbin"} ) with rep.timer.record("foobin"): pass return rep
def dummy_test_plan_report_with_binary_asserts(): tg_2 = generate_dummy_testgroup() res = Result() res.equal(1, 1, "IGNORE THIS") res.equal(b"\xF2", b"\xf2", "IGNORE THIS") res.equal(b"\x00\xb1\xC1", b"\x00\xB2\xc2", "IGNORE THIS") # dict match nicely produce tupples, list, maps within the serialized schema a_dict = OrderedDict( [ (b"binarykey\xB1", "string value"), ("string_key", b"binary value\xB1"), ("key3", [b"binary\xB1", "in", "list"]), ("key4", (b"binary\xB1", "in", "tuple")), ] ) res.dict.match(a_dict, a_dict, "IGNORE THIS") btc_1 = TestCaseReport( name="binary_test_case_1", description="binary test case 1 description", entries=res.serialized_entries, ) btg_1 = TestGroupReport( name="Binary Test Group 2", description="Binary Test Group 1 description", category=ReportCategories.TESTGROUP, entries=[btc_1], tags={}, ) rep = TestReport( name="My Bin Plan", description="Plan executing binary assertions", entries=[tg_2, btg_1], meta={"foobin": "bazbin"}, ) with rep.timer.record("foobin"): pass return rep
def test_attachment(self, result: Result): result.attach(__file__, "example attachment")