Esempio n. 1
0
    def test_parts_unparsed(self):
        parts = [u('part1'), u('part2')]
        part = SEPARATOR.join(parts)
        p = BasePath._from_parts([part])

        assert p.parts == parts
        assert p.separator == SEPARATOR
Esempio n. 2
0
    def test_separator(self):
        parts = []
        separator = '.'
        p = BasePath._from_parts(
            parts, separator=separator)

        assert p.parts == parts
        assert p.separator == separator
Esempio n. 3
0
    def test_parts_many(self):
        parts = [u('part1'), u('part2')]
        p = BasePath._from_parts(parts)

        assert p.parts == parts
        assert p.separator == SEPARATOR
Esempio n. 4
0
    def test_default(self):
        parts = []
        p = BasePath._from_parts(parts)

        assert p.parts == parts
        assert p.separator == SEPARATOR