def test_optional_existing_dest(self): p = self.tmppath("dest") with open(p, "a"): pass f = ExistingFile(required=False) f.copy(p)
def test_required_existing_dest(self): p = self.tmppath("dest") with open(p, "a"): pass f = ExistingFile(required=True) f.copy(p)
def test_required_existing_dest(self): p = self.tmppath('dest') with open(p, 'a'): pass f = ExistingFile(required=True) f.copy(p)
def test_optional_existing_dest(self): p = self.tmppath('dest') with open(p, 'a'): pass f = ExistingFile(required=False) f.copy(p)
def test_optional_missing_dest(self): f = ExistingFile(required=False) f.copy(self.tmppath("dest"))
def test_required_missing_dest(self): with self.assertRaisesRegexp(ErrorMessage, "Required existing file"): f = ExistingFile(required=True) f.copy(self.tmppath("dest"))
def test_optional_missing_dest(self): f = ExistingFile(required=False) f.copy(self.tmppath('dest'))
def test_required_missing_dest(self): with self.assertRaisesRegexp(ErrorMessage, 'Required existing file'): f = ExistingFile(required=True) f.copy(self.tmppath('dest'))