def test_iter_paths(self): d = NamespaceDict() paths = [path for path in d._iter_paths("/")] self.assertListEqual(["/"], paths) paths = [path for path in d._iter_paths("/f/o/o/")] self.assertListEqual(["/", "/f", "/f/o", "/f/o/o"], paths) paths = [path for path in d._iter_paths("/f/o/o")] self.assertListEqual(["/", "/f", "/f/o", "/f/o/o"], paths)
def test_iter_paths(self): d = NamespaceDict() paths = [path for path in d._iter_paths('/')] self.assertListEqual(['/'], paths) paths = [path for path in d._iter_paths('/f/o/o/')] self.assertListEqual([ '/', '/f', '/f/o', '/f/o/o', ], paths) paths = [path for path in d._iter_paths('/f/o/o')] self.assertListEqual([ '/', '/f', '/f/o', '/f/o/o', ], paths)