1# test errors from bad operations (unary, binary, etc)
2
3# unsupported unary operators
4try:
5    ~bytearray()
6except TypeError:
7    print('TypeError')
8
9# unsupported binary operators
10try:
11    bytearray() // 2
12except TypeError:
13    print('TypeError')
14
15# object with buffer protocol needed on rhs
16try:
17    bytearray(1) + 1
18except TypeError:
19    print('TypeError')
20