Le samedi 26 novembre 2011 à 14:06 +0100, Joachim Durchholz a écrit :
> Issue link: http://code.google.com/p/sympy/issues/detail?id=2867
> 
> The idea here is to have a lambda expression instead of a string.
> I.e. instead of
>  >>> raises(TypeError, "Rational(2)*MyInt")
> we want
>  >>> raises(TypeError, lambda: Rational(2)*MyInt)
> 
> This works very well, except when the code needs to test a statement 
> instead of an exception. I'd like to hear how to deal with these.

As with most problems concerning the test suite, the best solution would
be to use pytest: [http://pytest.org/latest/builtin.html#pytest.raises].

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
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