Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.2.0: xfail spelling change breaks test suite #4705

Closed
hackebrot opened this issue Feb 1, 2019 · 3 comments
Closed

Release 4.2.0: xfail spelling change breaks test suite #4705

hackebrot opened this issue Feb 1, 2019 · 3 comments
Labels
good first issue easy issue that is friendly to new contributor type: docs documentation improvement, missing or needing clarification

Comments

@hackebrot
Copy link
Member

Hi friends! 👋

Upgrading to pytest 4.2.0 caused failures in the pytest-emoji testsuite, because pytest_report_teststatus now returns XFAIL instead of xfail for the verbose test report.

I'm raising this here as our changelog did not warn about this change (#4667, #4668). I welcome the change for the sake of consistency with other test outcomes, but I'm afraid this might cause some confusion for plugin maintainers.

How do you feel about updating the changelog to warn about this change? I'm happy to submit a pull request for that, if you think it makes sense. 🤔

Here's a minimal testcase, which passes for 4.1.0 but fails for 4.2.0:

import textwrap
import pytest


def test_emoji_disabled_by_default_verbose(testdir):
    testdir.makepyfile(
        textwrap.dedent(
            """
        # -*- coding: utf-8 -*-

        import pytest

        def test_passed():
            assert True

        def test_failed():
            assert False

        @pytest.mark.xfail
        def test_xfailed():
            assert False

        @pytest.mark.xfail
        def test_xpassed():
            assert True
        """
        )
    )

    result = testdir.runpytest("-v", "-o", "console_output_style=classic")

    result.stdout.fnmatch_lines(
        [
            "*::test_passed PASSED",
            "*::test_failed FAILED",
            "*::test_xfailed xfail",
            "*::test_xpassed XPASS",
        ]
    )

    assert result.ret == 1
@nicoddemus
Copy link
Member

Howdy Raphael!

How do you feel about updating the changelog to warn about this change? I'm happy to submit a pull request for that, if you think it makes sense.

Sounds good, indeed that slipped and we should make the change clearer in the CHANGELOG. It would be great if you could submit a PR. 👍 🙇

@nicoddemus nicoddemus added type: docs documentation improvement, missing or needing clarification good first issue easy issue that is friendly to new contributor labels Feb 1, 2019
@hackebrot
Copy link
Member Author

Which changelog category would be most fitting?

@nicoddemus
Copy link
Member

I think "trivial" is OK?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue easy issue that is friendly to new contributor type: docs documentation improvement, missing or needing clarification
Projects
None yet
Development

No branches or pull requests

2 participants