Esempio n. 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
Esempio n. 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
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)