def test_fail(self, value, errstr): errstr = errstr.format(u=('', 'u')[ndef.record._PY2]) with pytest.raises((TypeError, ValueError)) as excinfo: Record._value_to_latin(value, 'value') assert str(excinfo.value) == "ndef.record.Record value " + errstr
def test_fail(self, value, errstr): errstr = errstr.format(u=('', 'u')[ndef.record._PY2]) with pytest.raises((TypeError, ValueError)) as excinfo: Record._value_to_latin(value, 'value') assert str(excinfo.value) == "ndef.record.Record value " + errstr
def test_pass(self, value): assert Record._value_to_latin(value, 'value') == '\xe4bc'
def test_pass(self, value): assert Record._value_to_latin(value, 'value') == '\xe4bc'