コード例 #1
0
 def get_dir(self, path, revnum):
     try:
         return (None, self._paths[path], None)
     except KeyError:
         raise subvertpy.SubversionException("foo",
                 subvertpy.ERR_FS_NOT_FOUND)
コード例 #2
0
ファイル: test_errors.py プロジェクト: jelmer/breezy-svn
 def test_proppatch_failed(self):
     self.assertIsInstance(convert_error(
         subvertpy.SubversionException("Proppatch failed",
             subvertpy.ERR_RA_DAV_PROPPATCH_FAILED)), PropertyChangeFailed)
コード例 #3
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_convert_perm_denied(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "Permission Denied", subvertpy.ERR_RA_NOT_AUTHORIZED)),
         PermissionDenied)
コード例 #4
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_convert_unexpected_end(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException("Unexpected end of stream",
                                           subvertpy.ERR_INCOMPLETE_DATA)),
         UnexpectedEndOfContainerError)
コード例 #5
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_convert_error_reset(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "Connection closed",
                 subvertpy.ERR_RA_SVN_CONNECTION_CLOSED)), ConnectionReset)
コード例 #6
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_convert_error_lock(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException("Working copy locked",
                                           subvertpy.ERR_WC_LOCKED)),
         LockActive)
コード例 #7
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_convert_dav_request_failed(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "foo", subvertpy.ERR_RA_DAV_REQUEST_FAILED)),
         DavRequestFailed)
コード例 #8
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_convert_malformed(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "foo", subvertpy.ERR_RA_SVN_MALFORMED_DATA)),
         TransportError)
コード例 #9
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_throws_svn():
     raise subvertpy.SubversionException(
         "Connection closed", subvertpy.ERR_RA_SVN_CONNECTION_CLOSED)
コード例 #10
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_convert_error_unknown(self):
     self.assertIsInstance(
         convert_error(subvertpy.SubversionException("foo", -4)),
         subvertpy.SubversionException)
コード例 #11
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_throws_svn():
     raise subvertpy.SubversionException("foo", 2000)
コード例 #12
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_hook_failed(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "Hook failed", subvertpy.ERR_REPOS_HOOK_FAILURE)),
         TipChangeRejected)
コード例 #13
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_not_implemented(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "Remote server doesn't support ...",
                 subvertpy.ERR_RA_NOT_IMPLEMENTED)), NotImplementedError)
コード例 #14
0
ファイル: test_errors.py プロジェクト: breezy-team/breezy-svn
 def test_convert_unknown_hostname(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException("Unknown hostname 'bla'",
                                           subvertpy.ERR_UNKNOWN_HOSTNAME)),
         ConnectionError)
コード例 #15
0
 def test_exc(self):
     self.assertTrue(
         isinstance(subvertpy.SubversionException("foo", 1), Exception))