2017-02-15 10:11:16 -05:00
|
|
|
# test errors from bad operations (unary, binary, etc)
|
|
|
|
try:
|
|
|
|
memoryview
|
|
|
|
except:
|
|
|
|
print("SKIP")
|
2017-06-10 13:03:01 -04:00
|
|
|
raise SystemExit
|
2017-02-15 10:11:16 -05:00
|
|
|
|
|
|
|
# unsupported binary operators
|
2023-05-12 09:14:44 -04:00
|
|
|
try:
|
|
|
|
memoryview(b"") + b""
|
|
|
|
except TypeError:
|
|
|
|
print("TypeError")
|
|
|
|
|
|
|
|
try:
|
|
|
|
memoryview(b"") + memoryview(b"")
|
|
|
|
except TypeError:
|
|
|
|
print("TypeError")
|
|
|
|
|
2018-02-14 00:50:20 -05:00
|
|
|
try:
|
|
|
|
m = memoryview(bytearray())
|
|
|
|
m += bytearray()
|
|
|
|
except TypeError:
|
2023-05-12 09:14:44 -04:00
|
|
|
print("TypeError")
|