Hi Thomas,

It seems to be a bug in pytest-sugar. Could you please create a new issue
in their issue tracker[1]?

[1] https://github.com/Frozenball/pytest-sugar/issues

Cheers,
Bruno.

On Sat, Feb 6, 2016 at 7:10 AM Thomas De Schampheleire <
[email protected]> wrote:

> Hi,
>
> (I asked this question on IRC but had to leave before I got an answer)
>
> I have been recommended to use pytest-sugar and so far have liked it a lot.
> However, I now noticed a problem in reporting of skipped tests.
>
> If I use pytest.mark.skipif for a test, the test is not shown as
> 'skipped' with pytest-sugar, while regular pytest does.
> If I use nose.plugins.skip.SkipTest from a test instead, pytest-sugar
> _does_ see it as skipped.
>
> Am I incorrect in expecting to see tests that are skipped with skipif
> to be marked as 'skipped' in pytest-sugar?
>
> Example code is the following:
>
> import pytest
> import nose
>
> def test_foo():
>     assert True
>
> @pytest.mark.skipif(True, reason='testing skipping')
> def test_skipped():
>     assert False
>
> def test_nose_skipped():
>     raise nose.plugins.skip.SkipTest('nose skipping')
>     assert False
>
>
>
> I tried to add some debug statements in pytest_sugar.py, and noticed
> that for the skipif test there is a 'setup' trigger where
> report.status says 'skipped' but it becomes 'passed' in the 'teardown'
> trigger. There is no 'call' trigger for that skipped test.
> I have not been able to determine any useful things further.
>
> Please let me know if this is expected behavior, and what I should do
> to display skipped tests.
>
> Thanks,
> Thomas
> _______________________________________________
> pytest-dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/pytest-dev
>
_______________________________________________
pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to