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