Skip to content

Comments

python310Packages.pytest-asyncio: 0.20.3 -> 0.21.0#222848

Closed
dotlambda wants to merge 1 commit intoNixOS:stagingfrom
dotlambda:pytest-asyncio-0.21.0
Closed

python310Packages.pytest-asyncio: 0.20.3 -> 0.21.0#222848
dotlambda wants to merge 1 commit intoNixOS:stagingfrom
dotlambda:pytest-asyncio-0.21.0

Conversation

@dotlambda
Copy link
Member

Description of changes

Diff: pytest-dev/pytest-asyncio@refs/tags/v0.20.3...v0.21.0

Changelog: https://github.com/pytest-dev/pytest-asyncio/blob/v0.21.0/docs/source/reference/changelog.rst

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Mar 24, 2023
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Mar 24, 2023
@dotlambda dotlambda marked this pull request as draft March 24, 2023 15:20
@dotlambda dotlambda force-pushed the pytest-asyncio-0.21.0 branch from 90833ac to ff836f5 Compare March 25, 2023 05:57
@dotlambda dotlambda requested a review from mweinelt March 25, 2023 06:00
@dotlambda
Copy link
Member Author

The tests fail.
============================= test session starts ==============================
platform linux -- Python 3.10.10, pytest-7.2.1, pluggy-1.0.0
rootdir: /build/python3.10-pytest-asyncio-0.21.0-testout
plugins: flaky-3.7.0, hypothesis-6.68.2, trio-0.7.0, asyncio-0.21.0
asyncio: mode=strict
collected 72 items

tests/test_asyncio_fixture.py ......                                     [  8%]
tests/test_dependent_fixtures.py ..                                      [ 11%]
tests/test_event_loop_fixture.py .                                       [ 12%]
tests/test_event_loop_fixture_finalizer.py ......                        [ 20%]
tests/test_flaky_integration.py .                                        [ 22%]
tests/test_simple.py ..x.........FFFs..                                  [ 47%]
tests/test_subprocess.py .                                               [ 48%]
tests/async_fixtures/test_async_fixtures.py FF                           [ 51%]
tests/async_fixtures/test_async_fixtures_scope.py F                      [ 52%]
tests/async_fixtures/test_async_fixtures_with_finalizer.py ..            [ 55%]
tests/async_fixtures/test_async_gen_fixtures.py FFF                      [ 59%]
tests/async_fixtures/test_nested.py F                                    [ 61%]
tests/async_fixtures/test_parametrized_loop.py EE                        [ 63%]
tests/hypothesis/test_base.py .......                                    [ 73%]
tests/hypothesis/test_inherited_test.py ..                               [ 76%]
tests/loop_fixture_scope/test_loop_fixture_scope.py ..                   [ 79%]
tests/markers/test_class_marker.py .                                     [ 80%]
tests/markers/test_module_marker.py ..                                   [ 83%]
tests/modes/test_auto_mode.py ......                                     [ 91%]
tests/modes/test_strict_mode.py ...                                      [ 95%]
tests/multiloop/test_alternative_loops.py ..                             [ 98%]
tests/trio/test_fixtures.py .                                            [100%]

==================================== ERRORS ====================================
_________________ ERROR at setup of test_parametrized_loop[a] __________________
The requested fixture has no parameter defined for test:
    tests/async_fixtures/test_parametrized_loop.py::test_parametrized_loop[a]

Requested fixture 'event_loop' defined in:
tests/async_fixtures/test_parametrized_loop.py:14

Requested here:
/nix/store/ma77c9gm2zbikjjgf3i6hs3rp9i13f2r-python3.10-pytest-7.2.1/lib/python3.10/site-packages/_pytest/fixtures.py:550
_________________ ERROR at setup of test_parametrized_loop[b] __________________
The requested fixture has no parameter defined for test:
    tests/async_fixtures/test_parametrized_loop.py::test_parametrized_loop[b]

Requested fixture 'event_loop' defined in:
tests/async_fixtures/test_parametrized_loop.py:14

Requested here:
/nix/store/ma77c9gm2zbikjjgf3i6hs3rp9i13f2r-python3.10-pytest-7.2.1/lib/python3.10/site-packages/_pytest/fixtures.py:550
=================================== FAILURES ===================================
____________ TestEventLoopStartedBeforeFixtures.test_no_event_loop _____________

self = <test_simple.TestEventLoopStartedBeforeFixtures object at 0x7ffff6195330>
loop = <coroutine object TestEventLoopStartedBeforeFixtures.loop at 0x7ffff5785b60>

    @pytest.mark.asyncio
    async def test_no_event_loop(self, loop):
>       assert await loop.run_in_executor(None, self.foo) == 1
E       AttributeError: 'coroutine' object has no attribute 'run_in_executor'

tests/test_simple.py:225: AttributeError
_______ TestEventLoopStartedBeforeFixtures.test_event_loop_after_fixture _______

self = <test_simple.TestEventLoopStartedBeforeFixtures object at 0x7ffff6194d00>
loop = <coroutine object TestEventLoopStartedBeforeFixtures.loop at 0x7ffff57f8c10>
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>

    @pytest.mark.asyncio
    async def test_event_loop_after_fixture(self, loop, event_loop):
>       assert await loop.run_in_executor(None, self.foo) == 1
E       AttributeError: 'coroutine' object has no attribute 'run_in_executor'

tests/test_simple.py:229: AttributeError
______ TestEventLoopStartedBeforeFixtures.test_event_loop_before_fixture _______

self = <test_simple.TestEventLoopStartedBeforeFixtures object at 0x7ffff6196c20>
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
loop = <coroutine object TestEventLoopStartedBeforeFixtures.loop at 0x7ffff57f9230>

    @pytest.mark.asyncio
    async def test_event_loop_before_fixture(self, event_loop, loop):
>       assert await loop.run_in_executor(None, self.foo) == 1
E       AttributeError: 'coroutine' object has no attribute 'run_in_executor'

tests/test_simple.py:233: AttributeError
______________________________ test_async_fixture ______________________________

async_fixture = <coroutine object async_fixture at 0x7ffff57f9930>
mock = <Mock id='140737311396032'>

    @pytest.mark.asyncio
    async def test_async_fixture(async_fixture, mock):
>       assert mock.call_count == 1
E       AssertionError: assert 0 == 1
E        +  where 0 = <Mock id='140737311396032'>.call_count

tests/async_fixtures/test_async_fixtures.py:23: AssertionError
_______________ TestAsyncFixtureMethod.test_async_fixture_method _______________

self = <async_fixtures.test_async_fixtures.TestAsyncFixtureMethod object at 0x7ffff61903d0>

    @pytest.mark.asyncio
    async def test_async_fixture_method(self):
>       assert self.is_same_instance
E       assert False
E        +  where False = <async_fixtures.test_async_fixtures.TestAsyncFixtureMethod object at 0x7ffff61903d0>.is_same_instance

tests/async_fixtures/test_async_fixtures.py:37: AssertionError
___________________________ test_async_fixture_scope ___________________________

async_fixture = <coroutine object async_fixture at 0x7ffff57fa880>

    @pytest.mark.asyncio
    async def test_async_fixture_scope(async_fixture):
>       assert async_fixture == 1
E       assert <coroutine object async_fixture at 0x7ffff57fa880> == 1

tests/async_fixtures/test_async_fixtures_scope.py:26: AssertionError
____________________________ test_async_gen_fixture ____________________________

async_gen_fixture = <async_generator object async_gen_fixture at 0x7ffff4ea3ac0>
mock = <Mock id='140737302092704'>

    @pytest.mark.asyncio
    async def test_async_gen_fixture(async_gen_fixture, mock):
>       assert mock.called
E       AssertionError: assert False
E        +  where False = <Mock id='140737302092704'>.called

tests/async_fixtures/test_async_gen_fixtures.py:27: AssertionError
_______________________ test_async_gen_fixture_finalized _______________________

mock = <Mock id='140737302092704'>

    @pytest.mark.asyncio
    async def test_async_gen_fixture_finalized(mock):
        try:
>           assert mock.called
E           AssertionError: assert False
E            +  where False = <Mock id='140737302092704'>.called

tests/async_fixtures/test_async_gen_fixtures.py:35: AssertionError
___________ TestAsyncGenFixtureMethod.test_async_gen_fixture_method ____________

self = <async_fixtures.test_async_gen_fixtures.TestAsyncGenFixtureMethod object at 0x7ffff6190e80>

    @pytest.mark.asyncio
    async def test_async_gen_fixture_method(self):
>       assert self.is_same_instance
E       assert False
E        +  where False = <async_fixtures.test_async_gen_fixtures.TestAsyncGenFixtureMethod object at 0x7ffff6190e80>.is_same_instance

tests/async_fixtures/test_async_gen_fixtures.py:51: AssertionError
______________________________ test_async_fixture ______________________________

async_fixture_outer = <async_generator object async_fixture_outer at 0x7ffff4ef80c0>

    @pytest.mark.asyncio
    async def test_async_fixture(async_fixture_outer):
>       assert async_fixture_outer is True
E       assert <async_generator object async_fixture_outer at 0x7ffff4ef80c0> is True

tests/async_fixtures/test_nested.py:25: AssertionError
=============================== warnings summary ===============================
tests/test_simple.py: 3 warnings
tests/async_fixtures/test_async_fixtures.py: 2 warnings
tests/async_fixtures/test_async_fixtures_scope.py: 1 warning
tests/async_fixtures/test_async_gen_fixtures.py: 3 warnings
tests/async_fixtures/test_nested.py: 1 warning
tests/async_fixtures/test_parametrized_loop.py: 2 warnings
  /nix/store/kkknif9ym0civcny3ghyb6lh5287n8jb-python3.10-pytest-trio-0.7.0/lib/python3.10/site-packages/pytest_trio/plugin.py:62: TrioDeprecationWarning: trio.MultiError is deprecated since Trio 0.22.0; use BaseExceptionGroup (on Python 3.11 and later) or exceptiongroup.BaseExceptionGroup (earlier versions) instead (https://github.com/python-trio/trio/issues/2211)
    if issubclass(call.excinfo.type, trio.MultiError):

tests/async_fixtures/test_async_fixtures_with_finalizer.py::test_module_with_get_event_loop_finalizer
  /nix/store/ma77c9gm2zbikjjgf3i6hs3rp9i13f2r-python3.10-pytest-7.2.1/lib/python3.10/site-packages/_pytest/fixtures.py:1044: RuntimeWarning: coroutine 'port_with_event_loop_finalizer' was never awaited
    self.cached_result = None
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

tests/async_fixtures/test_async_fixtures_with_finalizer.py::test_module_with_get_event_loop_finalizer
  /nix/store/ma77c9gm2zbikjjgf3i6hs3rp9i13f2r-python3.10-pytest-7.2.1/lib/python3.10/site-packages/_pytest/runner.py:137: RuntimeWarning: coroutine 'port_with_get_event_loop_finalizer' was never awaited
    item.funcargs = None  # type: ignore[attr-defined]
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_simple.py::TestEventLoopStartedBeforeFixtures::test_no_event_loop - AttributeError: 'coroutine' object has no attribute 'run_in_executor'
FAILED tests/test_simple.py::TestEventLoopStartedBeforeFixtures::test_event_loop_after_fixture - AttributeError: 'coroutine' object has no attribute 'run_in_executor'
FAILED tests/test_simple.py::TestEventLoopStartedBeforeFixtures::test_event_loop_before_fixture - AttributeError: 'coroutine' object has no attribute 'run_in_executor'
FAILED tests/async_fixtures/test_async_fixtures.py::test_async_fixture - AssertionError: assert 0 == 1
FAILED tests/async_fixtures/test_async_fixtures.py::TestAsyncFixtureMethod::test_async_fixture_method - assert False
FAILED tests/async_fixtures/test_async_fixtures_scope.py::test_async_fixture_scope - assert <coroutine object async_fixture at 0x7ffff57fa880> == 1
FAILED tests/async_fixtures/test_async_gen_fixtures.py::test_async_gen_fixture - AssertionError: assert False
FAILED tests/async_fixtures/test_async_gen_fixtures.py::test_async_gen_fixture_finalized - AssertionError: assert False
FAILED tests/async_fixtures/test_async_gen_fixtures.py::TestAsyncGenFixtureMethod::test_async_gen_fixture_method - assert False
FAILED tests/async_fixtures/test_nested.py::test_async_fixture - assert <async_generator object async_fixture_outer at 0x7ffff4ef80c0> is True
ERROR tests/async_fixtures/test_parametrized_loop.py::test_parametrized_loop[a]
ERROR tests/async_fixtures/test_parametrized_loop.py::test_parametrized_loop[b]
== 10 failed, 58 passed, 1 skipped, 1 xfailed, 14 warnings, 2 errors in 4.64s ==
Any ideas?

@dotlambda
Copy link
Member Author

The tests fail.

Turns out those failures already happen on master.

@SuperSandro2000
Copy link
Member

included in #244135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

Development

Successfully merging this pull request may close these issues.

2 participants