Exemple #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
Exemple #2
0
    def test_separator(self):
        parts = []
        separator = '.'
        p = BasePath._from_parts(
            parts, separator=separator)

        assert p.parts == parts
        assert p.separator == separator
Exemple #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
Exemple #4
0
    def test_default(self):
        parts = []
        p = BasePath._from_parts(parts)

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