示例#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')
示例#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')
示例#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'))
示例#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'))