File: test_joining_paths.py

package info (click to toggle)
trash-cli 0.24.5.26-0.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,972 kB
  • sloc: python: 9,789; sh: 121; makefile: 11
file content (9 lines) | stat: -rw-r--r-- 426 bytes parent folder | download
1
2
3
4
5
6
7
8
9
# Copyright (C) 2011 Andrea Francia Trivolzio(PV) Italy

def test_how_path_joining_works():
    from os.path import join
    assert '/another-absolute' == join('/absolute', '/another-absolute')
    assert '/absolute/relative' == join('/absolute', 'relative')
    assert '/absolute' == join('relative', '/absolute')
    assert 'relative/relative' == join('relative', 'relative')
    assert '/absolute' == join('', '/absolute')