tests: Add tests to improve coverage of py/objtype.c.

This commit is contained in:
Damien George
2017-12-14 12:25:30 +11:00
parent badaf3ecfe
commit 36f79523ab
5 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# test sys.getsizeof() function
import sys
try:
sys.getsizeof
except AttributeError:
print('SKIP')
raise SystemExit
print(sys.getsizeof([1, 2]) >= 2)
print(sys.getsizeof({1: 2}) >= 2)
class A:
pass
print(sys.getsizeof(A()) > 0)