def test_leaves(self): d = NamespaceDict() self.assertSetEqual(set(), d._leaves()) d["/f/o/o/r"] = "bar" self.assertSetEqual(set(["/f/o/o/r"]), d._leaves()) d["/f/o/o/z"] = "baz" self.assertSetEqual(set(["/f/o/o/r", "/f/o/o/z"]), d._leaves())
def test_leaves(self): d = NamespaceDict() self.assertSetEqual(set(), d._leaves()) d['/f/o/o/r'] = 'bar' self.assertSetEqual(set(['/f/o/o/r']), d._leaves()) d['/f/o/o/z'] = 'baz' self.assertSetEqual(set(['/f/o/o/r', '/f/o/o/z']), d._leaves())