On Thu, Aug 7, 2014 at 9:49 AM, Harsh Gupta wrote:
>> What is the is benefit of all these XFAIL'ed tests?
>
> A passed XFAIL'ed test is reported. Just as a seemly unrelated change
> can make a test fail, a seemly unrelated change can also make the test
> pass and it important to be aware both the cases.
Though, in practice, I don't know if anyone is using this feature.
--
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/fe56f692-548e-4f0c-990e-5b3a143f3c1c%40googlegroups.com.
--
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/20140824134858.GA3684%40debian.
import pytest
@pytest.mark.xfail(raises=IndexError)def test_false_xfail(): x= [1, 2, 3] assert x[0] == 3
@pytest.mark.xfail(raises=IndexError)def test_true_xfail(): x= [1, 2, 3] assert x[5] == 3
@pytest.mark.xfail(raises=IndexError)def test_passing_xfail(): x= [1, 2, 3] assert x[0] == 1$ py.test test_demo.py -v============================= test session starts ==============================platform linux -- Python 3.4.1 -- py-1.4.25 -- pytest-2.6.3 -- /home/ptb/miniconda3/bin/python3collected 3 items
test_demo.py::test_false_xfail FAILEDtest_demo.py::test_true_xfail xfailtest_demo.py::test_passing_xfail XPASS
=================================== FAILURES ===================================_______________________________ test_false_xfail _______________________________
@pytest.mark.xfail(raises=IndexError) def test_false_xfail(): x= [1, 2, 3]> assert x[0] == 3E assert 1 == 3
test_demo.py:6: AssertionError================ 1 failed, 1 xfailed, 1 xpassed in 0.02 seconds ================