示例#1
0
文件: progress.py 项目: toofar/pycp
    def start(self):
        """Print what is going to be transferred,
        initialized self.start_time

        """
        to_print = pprint_transfer(self.src, self.dest)
        self.fd.write(to_print + "\n")
        self.start_time = time.time()
        ProgressBar.start(self)
示例#2
0
    def start(self):
        """Print what is going to be transferred,
        initialized self.start_time

        """
        to_print = pprint_transfer(self.src, self.dest)
        self.fd.write(to_print + "\n")
        self.start_time = time.time()
        ProgressBar.start(self)
示例#3
0
文件: test.py 项目: aldrik/pycp
 def test_no_sfx(self):
     src  = "/path/to/foo/a"
     dest = "/path/to/foo/b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, "/path/to/foo/{a => b}")
示例#4
0
文件: test.py 项目: aldrik/pycp
 def test_03(self):
     src  = "/path/to/foo/a/b"
     dest = "/path/to/foo/bar/a/b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, "/path/to/foo/{ => bar}/a/b")
示例#5
0
文件: test.py 项目: aldrik/pycp
 def test_no_pfx(self):
     src  = "/path/to/foo/a/b"
     dest = "/other/a/b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, "{/path/to/foo => /other}/a/b")
示例#6
0
文件: test.py 项目: aldrik/pycp
 def test_01(self):
     src  = "/path/to/foo"
     dest = "/path/to/bar"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, "/path/to/{foo => bar}")
示例#7
0
文件: test.py 项目: aldrik/pycp
 def test_02(self):
     src  = "/path/to/foo/a/b"
     dest = "/path/to/spam/a/b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, "/path/to/{foo => spam}/a/b")
示例#8
0
文件: test.py 项目: aldrik/pycp
 def test_03(self):
     src  = r"c:\path\to\foo\a\b"
     dest = r"c:\path\to\foo\bar\a\b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, r"c:\path\to\foo\{ => bar}\a\b")
示例#9
0
 def test_no_pfx(self):
     src = "/path/to/foo/a/b"
     dest = "/other/a/b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, "{/path/to/foo => /other}/a/b")
示例#10
0
 def test_no_sfx(self):
     src = r"c:\path\to\foo\a"
     dest = r"c:\path\to\foo\b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, r"c:\path\to\foo\{a => b}")
示例#11
0
 def test_no_dir(self):
     src = "a"
     dest = "b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, "a => b")
示例#12
0
 def test_03(self):
     src = r"c:\path\to\foo\a\b"
     dest = r"c:\path\to\foo\bar\a\b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, r"c:\path\to\foo\{ => bar}\a\b")
示例#13
0
 def test_other_drive(self):
     src = r"c:\path\to\foo\a\b"
     dest = r"d:\other\a\b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, r"{c:\path\to\foo => d:\other}\a\b")
示例#14
0
 def test_02(self):
     src = r"c:\path\to\foo\a\b"
     dest = r"c:\path\to\spam\a\b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, r"c:\path\to\{foo => spam}\a\b")
示例#15
0
 def test_01(self):
     src = r"c:\path\to\foo"
     dest = r"c:\path\to\bar"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, r"c:\path\to\{foo => bar}")
示例#16
0
 def test_no_sfx(self):
     src = "/path/to/foo/a"
     dest = "/path/to/foo/b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, "/path/to/foo/{a => b}")
示例#17
0
文件: test.py 项目: aldrik/pycp
 def test_01(self):
     src  = r"c:\path\to\foo"
     dest = r"c:\path\to\bar"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, r"c:\path\to\{foo => bar}")
示例#18
0
文件: test.py 项目: aldrik/pycp
 def test_no_sfx(self):
     src  = r"c:\path\to\foo\a"
     dest = r"c:\path\to\foo\b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, r"c:\path\to\foo\{a => b}")
示例#19
0
文件: test.py 项目: aldrik/pycp
 def test_02(self):
     src  = r"c:\path\to\foo\a\b"
     dest = r"c:\path\to\spam\a\b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, r"c:\path\to\{foo => spam}\a\b")
示例#20
0
 def test_02(self):
     src = "/path/to/foo/a/b"
     dest = "/path/to/spam/a/b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, "/path/to/{foo => spam}/a/b")
示例#21
0
文件: test.py 项目: aldrik/pycp
 def test_other_drive(self):
     src  = r"c:\path\to\foo\a\b"
     dest = r"d:\other\a\b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, r"{c:\path\to\foo => d:\other}\a\b")
示例#22
0
 def test_03(self):
     src = "/path/to/foo/a/b"
     dest = "/path/to/foo/bar/a/b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, "/path/to/foo/{ => bar}/a/b")
示例#23
0
文件: test.py 项目: aldrik/pycp
 def test_no_dir(self):
     src  = "a"
     dest = "b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, "a => b")
示例#24
0
 def test_01(self):
     src = "/path/to/foo"
     dest = "/path/to/bar"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, "/path/to/{foo => bar}")