Пример #1
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)
Пример #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
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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}")