def test_clear(self): t = Tier() t.extend([Item(id='t1'), Item(id='t2'), Item(id='t3')]) self.assertEqual(len(t), 3) t.clear() self.assertEqual(len(t), 0) self.assertIs(t.get(0), None) self.assertIs(t.get('t1'), None)
def test_clear(self): t = Tier() t.extend([Item(id='t1'), Item(id='t2'), Item(id='t3')]) assert len(t) == 3 t.clear() assert len(t) == 0 assert t.get(0) is None assert t.get('t1') is None