Exemple #1
0
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
Exemple #2
0
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
Exemple #3
0
 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)
Exemple #4
0
 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)
Exemple #5
0
 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)
Exemple #6
0
 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)