Skip to content

[self-tests] test_mark_inner/test_mark_outer fails against Pytest 6.2.0+ #208

Closed
@stanislavlevin

Description

@stanislavlevin
=============================================== test session starts ================================================
platform linux -- Python 3.9.4, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 -- /usr/src/RPM/BUILD/pytest-asyncio/.tox/py3/bin/python
cachedir: .tox/py3/.pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/usr/src/RPM/BUILD/pytest-asyncio/.hypothesis/examples')
rootdir: /usr/src/RPM/BUILD/pytest-asyncio, configfile: setup.cfg, testpaths: tests
plugins: asyncio-0.15.0.dev0, hypothesis-6.10.0
collected 39 items                                                                                                 

tests/test_dependent_fixtures.py::test_dependent_fixture PASSED                                              [  2%]
tests/test_dependent_fixtures.py::test_factory_involving_factories PASSED                                    [  5%]
tests/test_event_loop_scope.py::test_1 PASSED                                                                [  7%]
tests/test_event_loop_scope.py::test_2 PASSED                                                                [ 10%]
tests/test_event_loop_scope.py::test_3 PASSED                                                                [ 12%]
tests/test_hypothesis_integration.py::test_mark_inner PASSED                                                 [ 15%]
tests/test_hypothesis_integration.py::test_mark_outer FAILED                                                 [ 17%]
tests/test_hypothesis_integration.py::test_mark_and_parametrize[1] PASSED                                    [ 20%]
tests/test_hypothesis_integration.py::test_mark_and_parametrize[2] PASSED                                    [ 23%]
tests/test_hypothesis_integration.py::test_can_use_fixture_provided_event_loop PASSED                        [ 25%]
tests/test_simple.py::test_event_loop_fixture PASSED                                                         [ 28%]
tests/test_simple.py::test_asyncio_marker PASSED                                                             [ 30%]
tests/test_simple.py::test_asyncio_marker_fail XFAIL (need a failure)                                        [ 33%]
tests/test_simple.py::test_asyncio_marker_with_default_param PASSED                                          [ 35%]
tests/test_simple.py::test_unused_port_fixture PASSED                                                        [ 38%]
tests/test_simple.py::test_unused_port_factory_fixture PASSED                                                [ 41%]
tests/test_simple.py::test_unused_port_factory_duplicate PASSED                                              [ 43%]
tests/test_simple.py::Test::test_asyncio_marker_method PASSED                                                [ 46%]
tests/test_simple.py::TestUnexistingLoop::test_asyncio_marker_without_loop PASSED                            [ 48%]
tests/test_simple.py::TestEventLoopStartedBeforeFixtures::test_no_event_loop PASSED                          [ 51%]
tests/test_simple.py::TestEventLoopStartedBeforeFixtures::test_event_loop_after_fixture PASSED               [ 53%]
tests/test_simple.py::TestEventLoopStartedBeforeFixtures::test_event_loop_before_fixture PASSED              [ 56%]
tests/test_simple.py::test_no_warning_on_skip SKIPPED (Test a skip error inside asyncio)                     [ 58%]
tests/test_simple.py::test_async_close_loop PASSED                                                           [ 61%]
tests/test_subprocess.py::test_subprocess PASSED                                                             [ 64%]
tests/test_subprocess.py::test_subprocess_forbid PASSED                                                      [ 66%]
tests/async_fixtures/test_async_fixtures.py::test_async_fixture PASSED                                       [ 69%]
tests/async_fixtures/test_async_fixtures_scope.py::test_async_fixture_scope PASSED                           [ 71%]
tests/async_fixtures/test_async_fixtures_with_finalizer.py::test_module_with_event_loop_finalizer PASSED     [ 74%]
tests/async_fixtures/test_async_fixtures_with_finalizer.py::test_module_with_get_event_loop_finalizer PASSED [ 76%]
tests/async_fixtures/test_async_gen_fixtures.py::test_async_gen_fixture PASSED                               [ 79%]
tests/async_fixtures/test_async_gen_fixtures.py::test_async_gen_fixture_finalized PASSED                     [ 82%]
tests/async_fixtures/test_coroutine_fixtures.py::test_coroutine_fixture SKIPPED (@asyncio.coroutine fixt...) [ 84%]
tests/async_fixtures/test_nested.py::test_async_fixture PASSED                                               [ 87%]
tests/markers/test_class_marker.py::TestPyTestMark::test_is_asyncio PASSED                                   [ 89%]
tests/markers/test_module_marker.py::TestPyTestMark::test_is_asyncio PASSED                                  [ 92%]
tests/markers/test_module_marker.py::test_is_asyncio PASSED                                                  [ 94%]
tests/multiloop/test_alternative_loops.py::test_for_custom_loop PASSED                                       [ 97%]
tests/multiloop/test_alternative_loops.py::test_dependent_fixture PASSED                                     [100%]

===================================================== FAILURES =====
_________________________________________________ test_mark_outer __________________________________________________
.tox/py3/lib/python3/site-packages/_pytest/runner.py:311: in from_call
    result: Optional[TResult] = func()
.tox/py3/lib/python3/site-packages/_pytest/runner.py:255: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
.tox/py3/lib/python3/site-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
.tox/py3/lib/python3/site-packages/pluggy/manager.py:93: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
.tox/py3/lib/python3/site-packages/pluggy/manager.py:84: in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
.tox/py3/lib/python3/site-packages/_pytest/unraisableexception.py:88: in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
.tox/py3/lib/python3/site-packages/_pytest/unraisableexception.py:78: in unraisable_exception_runtest_hook
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E   pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
E   
E   Traceback (most recent call last):
E     File "/usr/src/RPM/BUILD/pytest-asyncio/.tox/py3/lib/python3/site-packages/hypothesis/core.py", line 553, in execute_once
E       def test(*args, **kwargs):
E   ResourceWarning: unclosed <socket.socket fd=13, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
============================================= short test summary info ==============================================
SKIPPED [1] tests/test_simple.py:156: Test a skip error inside asyncio
SKIPPED [1] tests/async_fixtures/test_coroutine_fixtures.py:23: @asyncio.coroutine fixtures are not supported yet
XFAIL tests/test_simple.py::test_asyncio_marker_fail
  need a failure
FAILED tests/test_hypothesis_integration.py::test_mark_outer - pytest.PytestUnraisableExceptionWarning: Exception...
================================ 1 failed, 35 passed, 2 skipped, 1 xfailed

As of 6.2.0 Pytest:

pytest now warns about unraisable exceptions and unhandled thread exceptions that occur in tests on Python>=3.8

https://docs.pytest.org/en/stable/changelog.html#pytest-6-2-0-2020-12-12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions