def test_existing_dest(self): p = self.tmppath('dest') with open(p, 'a'): pass f = RequiredExistingFile() f.copy(p)
def test_missing_dest(self): with self.assertRaisesRegexp(ErrorMessage, 'Required existing file'): f = RequiredExistingFile() f.copy(self.tmppath('dest'))