All pastes #901434 Raw Edit

Someone

public python v1 · immutable
·published 2008-02-12 17:27 UTC
rendered paste body
class SimpleRoot(pb.Root):(...)    def remote_unknownError(self):        """        Fail with error that is not known to client.        """        class UnknownError(pb.Error):            pass        raise UnknownError("I'm not known to client!")(...)class PBFailureTest(PBConnTestCase):(...)    def test_unknownFailure(self):        """        Test that an exception which is a subclass of L{pb.Error} but not known        on the client side has its name set properly        """        def failureUnknown(fail):            self.failUnless(isinstance(fail.type, str))            self.failUnless(fail.type == 'UnknownError')            return 431        return self._testImpl('unknownError', 431, failureUnknown)======================================================================[FAIL]: twisted.test.test_pbfailure.PBFailureTest.test_unknownFailureTraceback (most recent call last):  File "/usr/lib64/python2.5/site-packages/twisted/test/test_pbfailure.py", line 268, in failureUnknown    self.failUnless(fail.type == 'UnknownError')twisted.trial.unittest.FailTest: None