def test_copy_to_file(self): with self.assertRaises(ValueError) as cm: files.copy('~/.bashrc') error_message = str(cm.exception) self.assertEquals(error_message, "'~/.bashrc' is not a directory")
def test_copy_to_empty(self): with self.assertRaises(ValueError) as cm: files.copy('') error_message = str(cm.exception) self.assertEquals(error_message, 'path cannot be empty')