Skip to content

Recover non-running pretend tests in tests/test_proxy_functional.py #6031

@webknjaz

Description

@webknjaz

Describe the bug

While working on #6002 and #5992, I noticed several functions that are prefixed with xtest_ and are marked with @pytest.mark.xfail. Clearly @asvetlov wanted them to run but not influence the test session outcome. But pytest only picks up functions marked as test_ (by default) as tests so that never worked or was executed.

We need to drop that x and let them run. Also, we need to audit them to see if they are still relevant to the today's codebase. It sounds like they were added with these names originally back in 2017. And some of them were added earlier that year prefixed with _test_ (which wouldn't work either). The @pytest.mark.xfail decorator was added later (also the same year) but the names were never corrected so it didn't have any effect. Further archeology revealed that it was @fafhrd91 who changed test_ to _test_ (in Feb 2017) and before that the tests had the proper names and the regular xfail mark. And the original tests (that existed at the time) were added in 2016 by @kserhii.

There's no record of why those tests were disabled and forgotten so I'm posting these findings here for history.

To Reproduce

Run pytest -q --no-cov tests/test_proxy_functional.py --collect-only and see that none of the functions that start with xtest_ are listed there.

Expected behavior

The functions in question are also marked with @pytest.mark.xfail meaning that they are perceived by the humans as tests but because of a small oversight they are never picked up and run by pytest.

Logs/tracebacks

N/A

Python Version

N/A

aiohttp Version

master branch

multidict Version

N/A

yarl Version

N/A

OS

N/A

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    buginframetaregressionSomething that used to work stopped working "as before" after upgrade

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions