_os_path.py 249 B

123456789101112
  1. import os
  2. # test os.path.join
  3. f = os.path.join
  4. assert f('/', 'a') == '/a'
  5. assert f('/', 'a/', 'b/') == '/a/b/'
  6. assert f('c', 'd') == 'c/d'
  7. assert f('C:\\', 'a') == 'C:/a'
  8. assert f('C:\\', 'a\\', 'b\\') == 'C:/a/b/'
  9. assert f('c\\', 'd/') == 'c/d/'