示例#1
0
    def test_as_remote_with_win_paths(self):
        filename = "C:/local1/path/to/file"
        file = FilePath(filename)
        self.assertEqual("file:///C:/remote1/path/to/file",file.as_remote())

        filename = "file:///C:/local2/path/to/file"
        file = FilePath(filename)
        self.assertEqual("file:///C:/remote2/path/to/file",file.as_remote())
    def test_as_remote(self):
        filename = "/local1/path/to/file"
        file = FilePath(filename)
        self.assertEqual("file:///remote1/path/to/file", file.as_remote())

        filename = "/local2/path/to/file"
        file = FilePath(filename)
        self.assertEqual("file:///remote2/path/to/file", file.as_remote())
    def test_as_remote(self):
        filename = "G:\\local\\path\\to\\file"
        file = FilePath(filename)
        self.assertEqual("file:///remote/path/to/file", file.as_remote())

        filename = "file:///G:/local2/path/to/file"
        file = FilePath(filename)
        self.assertEqual("file:///remote2/path/to/file", file.as_remote())
示例#4
0
    def test_as_remote(self):
        filename = "/local1/path/to/file"
        file = FilePath(filename)
        self.assertEqual("file:///remote1/path/to/file",file.as_remote())

        filename = "/local2/path/to/file"
        file = FilePath(filename)
        self.assertEqual("file:///remote2/path/to/file",file.as_remote())
示例#5
0
    def test_as_remote(self):
        filename = "G:\\local\\path\\to\\file"
        file = FilePath(filename)
        self.assertEqual("file:///remote/path/to/file",file.as_remote())

        filename = "file:///G:/local2/path/to/file"
        file = FilePath(filename)
        self.assertEqual("file:///remote2/path/to/file",file.as_remote())
示例#6
0
    def test_as_remote_with_backslashed_win_paths(self):
        filename = "C:\\local1\\path\\to\\file"
        file = FilePath(filename)
        self.assertEqual("file:///C:/remote1/path/to/file",file.as_remote())

        filename = "C:\\local2\\path\\to\\file"
        file = FilePath(filename)
        self.assertEqual("file:///C:/remote2/path/to/file",file.as_remote())

        filename = "C:/local2/path/to/file"
        file = FilePath(filename)
        self.assertEqual("C:\\local2\\path\\to\\file",file.as_local())
示例#7
0
 def test_as_remote(self):
     filename = "/home/user/some/path"
     file = FilePath(filename)
     self.assertEqual(filename, file.as_remote())
示例#8
0
 def test_as_remote(self):
     filename = "/home/user/some/path"
     file = FilePath(filename)
     self.assertEqual(filename,file.as_remote())