[
https://issues.apache.org/jira/browse/THRIFT-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16753107#comment-16753107
]
James E. King III commented on THRIFT-1417:
-------------------------------------------
This is still a problem in 0.12.0:
{noformat}
===============================================================================
.....F................
======================================================================
FAIL: testException (__main__.BinaryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/thrift/src/test/py/TestClient.py", line 228, in testException
self.assertEqual(x_repr, 'Xception(errorCode=1001, message=\'Xception\')')
AssertionError: "Xception(errorCode=1001, _message=u'Xception')" !=
"Xception(errorCode=1001, message='Xception')"
{noformat}
> repr behavior is not consistant
> -------------------------------
>
> Key: THRIFT-1417
> URL: https://issues.apache.org/jira/browse/THRIFT-1417
> Project: Thrift
> Issue Type: Bug
> Components: Python - Compiler, Python - Library
> Environment: Ubuntu 10.04.1 LTS Lucid
> Reporter: Roger Meier
> Assignee: James E. King III
> Priority: Minor
>
> I have applied the following patch with THRIFT-1416
> {noformat}
> + # TODO ensure same behavior for repr within generated python variants
> # ensure exception's repr method works
> - x_repr = repr(x)
> - self.assertEqual(x_repr, 'Xception(errorCode=1001,
> message=\'Xception\')')
> + #x_repr = repr(x)
> + #self.assertEqual(x_repr, 'Xception(errorCode=1001,
> message=\'Xception\')')
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)