예제 #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
 def test_proppatch_failed(self):
     self.assertIsInstance(convert_error(
         subvertpy.SubversionException("Proppatch failed",
             subvertpy.ERR_RA_DAV_PROPPATCH_FAILED)), PropertyChangeFailed)
예제 #3
0
 def test_convert_perm_denied(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "Permission Denied", subvertpy.ERR_RA_NOT_AUTHORIZED)),
         PermissionDenied)
예제 #4
0
 def test_convert_unexpected_end(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException("Unexpected end of stream",
                                           subvertpy.ERR_INCOMPLETE_DATA)),
         UnexpectedEndOfContainerError)
예제 #5
0
 def test_convert_error_reset(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "Connection closed",
                 subvertpy.ERR_RA_SVN_CONNECTION_CLOSED)), ConnectionReset)
예제 #6
0
 def test_convert_error_lock(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException("Working copy locked",
                                           subvertpy.ERR_WC_LOCKED)),
         LockActive)
예제 #7
0
 def test_convert_dav_request_failed(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "foo", subvertpy.ERR_RA_DAV_REQUEST_FAILED)),
         DavRequestFailed)
예제 #8
0
 def test_convert_malformed(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "foo", subvertpy.ERR_RA_SVN_MALFORMED_DATA)),
         TransportError)
예제 #9
0
 def test_throws_svn():
     raise subvertpy.SubversionException(
         "Connection closed", subvertpy.ERR_RA_SVN_CONNECTION_CLOSED)
예제 #10
0
 def test_convert_error_unknown(self):
     self.assertIsInstance(
         convert_error(subvertpy.SubversionException("foo", -4)),
         subvertpy.SubversionException)
예제 #11
0
 def test_throws_svn():
     raise subvertpy.SubversionException("foo", 2000)
예제 #12
0
 def test_hook_failed(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "Hook failed", subvertpy.ERR_REPOS_HOOK_FAILURE)),
         TipChangeRejected)
예제 #13
0
 def test_not_implemented(self):
     self.assertIsInstance(
         convert_error(
             subvertpy.SubversionException(
                 "Remote server doesn't support ...",
                 subvertpy.ERR_RA_NOT_IMPLEMENTED)), NotImplementedError)
예제 #14
0
 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))