def test_unix_path_is_a_noop_on_sane_platforms(): path = r'/:we/don\t/need/no/stinking/badgers!' expect = path actual = cmds.unix_path(path, is_win32=lambda: False) assert expect == actual
def test_unix_path_network_win32(): path = r'\\Z\Program Files\git-cola\bin\git-dag' expect = '//Z/Program Files/git-cola/bin/git-dag' actual = cmds.unix_path(path, is_win32=lambda: True) assert expect == actual
def test_unix_path_win32(self): path = r'Z:\Program Files\git-cola\bin\git-dag' expect = '/Z/Program Files/git-cola/bin/git-dag' actual = cmds.unix_path(path, is_win32=lambda: True) self.assertEqual(expect, actual)
def test_unix_path_is_a_noop_on_sane_platforms(self): path = r"/:we/don\t/need/no/stinking/badgers!" expect = path actual = cmds.unix_path(path, is_win32=lambda: False) self.assertEqual(expect, actual)
def test_unix_path_win32(self): path = r"Z:\Program Files\git-cola\bin\git-dag" expect = "/Z/Program Files/git-cola/bin/git-dag" actual = cmds.unix_path(path, is_win32=lambda: True) self.assertEqual(expect, actual)
def test_unix_path_network_win32(self): path = r'\\Z\Program Files\git-cola\bin\git-dag' expect = '//Z/Program Files/git-cola/bin/git-dag' actual = cmds.unix_path(path, is_win32=lambda: True) self.assertEqual(expect, actual)