コード例 #1
0
    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)
コード例 #2
0
    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)