def test_clear(): od = OrderedDict(pairs) assert len(od) == 10 od.clear() assert len(od) == 0 od._check()