Beispiel #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)
Beispiel #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)
Beispiel #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}")
Beispiel #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")
Beispiel #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")
Beispiel #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}")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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}")
Beispiel #11
0
 def test_no_dir(self):
     src = "a"
     dest = "b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, "a => b")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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}")
Beispiel #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}")
Beispiel #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}")
Beispiel #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}")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #23
0
 def test_no_dir(self):
     src  = "a"
     dest = "b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, "a => b")
Beispiel #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}")