Travis failing perhaps due to build differences

51 views
Skip to first unread message

SAHIL SHEKHAWAT

unread,
Mar 29, 2014, 1:51:19 PM3/29/14
to sy...@googlegroups.com
For my pull request #7303 Travis is showing an error see https://travis-ci.org/sympy/sympy/jobs/21810070#L3374
while running the same code locally it is passing all the test and doctests. After discussing it on gitter with @zamrath i got to know that it can be due to build differences.
Any suggestion on how should i pass the test and merge the codes.

NOTE: this PR is for my patch requirement..please help 

Aaron Meurer

unread,
Mar 29, 2014, 3:39:28 PM3/29/14
to sy...@googlegroups.com
I guess the difference is that this is PyPy, but even on my computer, that test passes in PyPy. Do you have any guess what would cause it to get the -BOOLEANTRUE term (the - part in particular)?

Aaron Meurer


--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/82f51be5-1c30-45bd-b539-eee74c4f34ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SAHIL SHEKHAWAT

unread,
Mar 29, 2014, 3:44:34 PM3/29/14
to sy...@googlegroups.com
My guess is that somehow True and False are escaping from "not a.args is ()" which are checking if they have any arg and only then -BOOLEANTRUE can come.
The tests were passed when i explicitly added true and false in the condition.

Aaron Meurer

unread,
Mar 29, 2014, 3:47:40 PM3/29/14
to sy...@googlegroups.com
OH, I didn't see that.

You should not use "is" to compare things. "is" does an exact object comparison (in memory). So for instance

a = []
b = []
a is b

will give False, because a and b are different lists. For immutable objects like tuples, Python reserves the right to cache the same object for performance purposes, but does not guarantee it (with the exception of a few things like True, False, and None).  So it looks like CPython does cache the empty tuple (), but PyPy does not. 

Basically, you should never use "is", unless you really mean it. Always use "==".

Aaron Meurer



SAHIL SHEKHAWAT

unread,
Mar 29, 2014, 3:53:31 PM3/29/14
to sy...@googlegroups.com
Ah! sorry for that silly mistake..
I am correcting it now.  
Thanks aaron
Reply all
Reply to author
Forward
0 new messages