Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
Arquivo: test.py Projeto: 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}")
Exemplo n.º 4
0
Arquivo: test.py Projeto: 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")
Exemplo n.º 5
0
Arquivo: test.py Projeto: 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")
Exemplo n.º 6
0
Arquivo: test.py Projeto: 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}")
Exemplo n.º 7
0
Arquivo: test.py Projeto: 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")
Exemplo n.º 8
0
Arquivo: test.py Projeto: 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")
Exemplo n.º 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")
Exemplo n.º 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}")
Exemplo n.º 11
0
 def test_no_dir(self):
     src = "a"
     dest = "b"
     res = pprint_transfer(src, dest)
     self.assertEquals(res, "a => b")
Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 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}")
Exemplo n.º 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}")
Exemplo n.º 17
0
Arquivo: test.py Projeto: 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}")
Exemplo n.º 18
0
Arquivo: test.py Projeto: 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}")
Exemplo n.º 19
0
Arquivo: test.py Projeto: 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")
Exemplo n.º 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")
Exemplo n.º 21
0
Arquivo: test.py Projeto: 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")
Exemplo n.º 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")
Exemplo n.º 23
0
Arquivo: test.py Projeto: aldrik/pycp
 def test_no_dir(self):
     src  = "a"
     dest = "b"
     res  = pprint_transfer(src, dest)
     self.assertEquals(res, "a => b")
Exemplo n.º 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}")