OK, I see. That's what I was talking about in my reply to Joachim:
The reason that we use certain precomputed values is that doing the test 
with some randomly generated set of values as an additional argument is 
essentially going to have to repeat the calculations in the function itself 
(which we want to test) - whereas for concrete values we know the answer 
right away

so the situation is not as tautological as in your example (some nontrivial 
computations are needed to get from the precomputed random input to the 
answer in the tests in PR1377).

23 юни 2012, събота, 18:49:04 UTC+3, Stefan Krastanov написа:
>
> I was saying that they might be useless, because all that the test 
> does is to copy the logic of the function. 
>
> for instance: 
>
> a=1 
> b=2 
> assert a+b == 1+2 
>
> is not a good unit test because all that you do is to exactly copy the 
> function to be tested. 
>
> I feel that this is true for many of the random tests that we have. I 
> do not know if it true in your case. 
>
>
> And about my comment concerning the 2to3 script: 
>
> In order to use sympy on python3 you need to run a translator script. 
> Even if your tests are useless for algorithm checking, they will 
> stress the translator script and ensure that there are no errors in 
> it. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/JyWfQdlXlq4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to