def test_ImageDict_removes_all_items(self): d = ImageDict() obj = cv2.imread(path.join(_this_path, 'data', 'object.png')) d[obj] = 1 d.clear() self.assertEqual(len(d), 0)