def test_show(): d = {1:2, 3:4} l = [1,2,3] l2 = [1,2,3,4] tup = ("Hello, world!", "Goodbye, cruel world") tup2 = (tup, tup, tup, tup) tup3 = (3,) from sizer import scanner objs = scanner.Objects([d,l,l2,tup,tup2,tup3]) assert objs[id(d)].show() == "{1: 2, 3: 4}" assert objs[id(l)].show() == "[1, 2, 3]" assert objs[id(l2)].show()[:8] == "list at " assert objs[id(tup)].show() == "('Hello, world!', 'Goodbye, cruel world')" assert objs[id(tup2)].show()[:9] == "tuple at " assert objs[id(tup3)].show() == "(3,)"