tests/basics: Improve user class coverage.
This commit is contained in:
parent
1b41cacac7
commit
2eff9c29a1
|
@ -15,3 +15,12 @@ c = C()
|
|||
print(c[1])
|
||||
c[1] = 2
|
||||
del c[3]
|
||||
|
||||
# index not supported
|
||||
class A:
|
||||
pass
|
||||
a = A()
|
||||
try:
|
||||
a[1]
|
||||
except TypeError:
|
||||
print('TypeError')
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# converting user instance to buffer
|
||||
class C:
|
||||
pass
|
||||
|
||||
c = C()
|
||||
try:
|
||||
d = bytearray(c)
|
||||
except TypeError:
|
||||
print('TypeError')
|
Loading…
Reference in New Issue