[ 
https://issues.apache.org/jira/browse/THRIFT-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637982#action_12637982
 ] 

Esteve Fernandez commented on THRIFT-109:
-----------------------------------------

> I don't think assertAlmostEqual is correct here because we are checking 
> against a timeout
> (though I'm not sure that these tests are correct).

Well, I must agree that these tests are a bit crufty, since timeouts may vary. 
Anyway, I concur that assertAlmostEqual might not be the most appropiate method 
here, what about self.assert_(time.time() - starttime < 5.0) ?

> Also, why did you reverse the order in the comparisons?

Just like their Java counterpart, as a convention, self.assert* should receive 
the expected value as the first argument and the resulting one as the second.

> Python unit tests should use self.assert*
> -----------------------------------------
>
>                 Key: THRIFT-109
>                 URL: https://issues.apache.org/jira/browse/THRIFT-109
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Test Suite
>            Reporter: Esteve Fernandez
>            Priority: Minor
>         Attachments: py_unittests.patch
>
>
> In some of tests in the current testsuite for Python use, "assert EXPR" 
> instead of the standard self.assert* methods. It's recommended using these 
> methods as they give more information in case an assertion fails.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to