`xfail` doesn't communicate the right thing, this could fail for *any*
reason, and we wouldn't notice. if a test is passing, it should pass. xfail
means "this feature is broken". You can get that exception type with
`pytest.fail.Exception`.


On Thu, Mar 27, 2014 at 9:22 AM, Alex Stapleton <notifications@github.com>wrote:

> In tests/test_utils.py:
>
> > @@ -1608,3 +1610,37 @@ def test_load_fips_dsa_key_pair_vectors():
> >
> >  def test_vector_version():
> >      assert cryptography.__version__ == cryptography_vectors.__version__
> > +
> > +
> > +@pytest.mark.xfail
> > +def test_raises_unsupported_algorithm_wrong_type():
> > +    # Check that it asserts if the wrong type of exception is raised.
> > +    with raises_unsupported_algorithm(None):
>
> This doesn't raise AssertionError it raises a "Failed" somewhere inside
> pytest.raises. I think xfail matches the interface better given than the
> test is only 2 lines longs.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/849/files#r11030833>
> .
>



-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084