def test_negative_bytes(self): """bytes_to_ostr should fail when given negative bytes.""" with pytest.raises(OverflowError): bytes_to_ostr(-1) with pytest.raises(OverflowError): OperatorStr('a') - OperatorStr('b')
def test_bytes_to_ostr(self): assert bytes_to_ostr(108170603228769) == OperatorStr("banana") assert bytes_to_ostr(0x41) == OperatorStr("A")