Skip to content

Incomplete abstract class no longer logs an error #13546

Open
@Dreamsorcerer

Description

@Dreamsorcerer

We have this test in aiohttp:

def test_testcase_no_app(
    testdir: pytest.Testdir, loop: asyncio.AbstractEventLoop
) -> None:
    testdir.makepyfile(
        """
        from aiohttp.test_utils import AioHTTPTestCase


        class InvalidTestCase(AioHTTPTestCase):
            def test_noop(self) -> None:
                pass
        """
    )
    result = testdir.runpytest()
    result.stdout.fnmatch_lines(["*TypeError*"])

This has started failing sometime after 8.1.1.

The log seems to successfully run, rather than erroring.

Output from the test:

FAILED tests/test_test_utils.py::test_testcase_no_app - Failed: nomatch: '*TypeError*'
    and: '============================= test session starts =============================='
    and: 'platform darwin -- Python 3.11.9, pytest-8.4.1, pluggy-1.6.0'
    and: 'codspeed: 3.2.0 (disabled, mode: walltime, timer_resolution: 41.7ns)'
    and: 'rootdir: /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/pytest-of-runner/pytest-0/popen-gw1/test_testcase_no_app0'
    and: 'plugins: xdist-3.7.0, cov-6.2.1, mock-3.14.1, codspeed-3.2.0'
    and: 'collected 0 items'
    and: ''
    and: '============================ no tests ran in 0.01s ============================='
remains unmatched: '*TypeError*'

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: collectionrelated to the collection phasetype: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions