def test_hexstring_typeerror(): b = HexString("0x1234", "bytes32") with pytest.raises(TypeError): b == "potato" with pytest.raises(TypeError): b == "1234" assert str(b) != "potato"
def test_hexstring_length(): b = HexString("0x1234", "bytes32") assert b == "0x1234" assert b == "0x000000000000001234"
def test_hexstring_length(return_value): b = HexString('0x1234', "bytes32") assert b == "0x1234" assert b == "0x000000000000001234"