コード例 #1
0
ファイル: test_files.py プロジェクト: jalanb/projects
 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")
コード例 #2
0
ファイル: test_files.py プロジェクト: jalanb/projects
 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')