On Mon, Jun 29, 2009 at 5:24 PM, Ryan Krauss<ryanli...@gmail.com> wrote: > Cool. Aaron said to add a pass, but now that I think about it, you are > right, if it doesn't find a true case, it will just end up returning > hash(self) < hash(negative_self). So, you are definitely right about the > uselessness of my last 3 lines. > > So, help me learn from your tests: > assert ((-x-x*y)/y).could_extract_minus_sign() == True > assert (-(x+x*y)/y).could_extract_minus_sign() == True > assert ((x+x*y)/(-y)).could_extract_minus_sign() == True > assert ((x+x*y)/y).could_extract_minus_sign() == False > > I guess I see based on our discussion on IRC why you should check them all. > I don't think I would have come up with this many on my own.
I just checked all forms that we talked about on IRC explicitly in the tests, so that we can be sure that it works this way on all architectures. > Any advice on writing better sympy tests? Just test all possible things. Ondrej --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to sympy-patches@googlegroups.com To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en -~----------~----~----~----~------~----~------~--~---