Пример #1
0
    def test_path_split_unrooted(self):
        url = "root/elem1/elem2"

        result = list(urltree._path_split(url))

        self.assertEqual(result, ['root', 'elem1', 'elem2'])
Пример #2
0
    def test_path_split_withtrail(self):
        url = "///root//elem1/elem2"

        result = list(urltree._path_split(url))

        self.assertEqual(result, ['root', 'elem1', 'elem2'])