Exemplo n.º 1
0
 def test_cp_nonexistant(self):
     "Should raise"
     with self.assertRaises(exceptions.DoesNotExistError):
         p = Path('does/not/exist/here')
         p.cp('will/not/exist/there')
Exemplo n.º 2
0
 def test_cp_nonexistant(self):
     "Should raise"
     with self.assertRaises(exceptions.DoesNotExistError):
         p = Path('does/not/exist/here')
         p.cp('will/not/exist/there')
Exemplo n.º 3
0
 def test_cp_file(self):
     "Copy self to dest"
     p = Path(self.tdir) + 'some.txt'
     p << 'contents'
     p.cp(p.parent + 'some2.txt')
     self.assertTrue(filecmp.cmp(p, p.parent + 'some2.txt'))
Exemplo n.º 4
0
 def test_cp_file(self):
     "Copy self to dest"
     p = Path(self.tdir) + 'some.txt'
     p << 'contents'
     p.cp(p.parent + 'some2.txt')
     self.assertTrue(filecmp.cmp(p, p.parent + 'some2.txt'))