def test_fail(self, record_type, errstr): with pytest.raises((TypeError, ValueError)) as excinfo: Record._encode_type(record_type) assert str(excinfo.value) == "ndef.record.Record " + errstr
def test_fail(self, record_type, errstr): with pytest.raises((TypeError, ValueError)) as excinfo: Record._encode_type(record_type) assert str(excinfo.value) == "ndef.record.Record " + errstr
def test_pass(self, record_type, TNF, TYPE): assert Record._encode_type(record_type) == (TNF, TYPE) assert type(Record._encode_type(record_type)[1]) == bytes
def test_pass(self, record_type, TNF, TYPE): assert Record._encode_type(record_type) == (TNF, TYPE) assert type(Record._encode_type(record_type)[1]) == bytes