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

Tests fail against hypothesis 6.39.0 #302

Closed
mweinelt opened this issue Mar 2, 2022 · 6 comments · Fixed by #303
Closed

Tests fail against hypothesis 6.39.0 #302

mweinelt opened this issue Mar 2, 2022 · 6 comments · Fixed by #303
Assignees

Comments

@mweinelt
Copy link

mweinelt commented Mar 2, 2022

With pytest-asyncio==0.18.1 and hypothesis==6.39.0 we are seeing the following test failures.

Tests were working fine with hypothesis==6.35.0, hypothesis==6.37.2 and hypothesis==6.38.0. So tests are starting to fail with 6.39.0

=================================== FAILURES ===================================
_______________________________ test_mark_inner ________________________________
tests/hypothesis/test_base.py:19: in test_mark_inner
    @pytest.mark.asyncio
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:470: in run
    self._run()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:872: in _run
    self.generate_new_examples()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:604: in generate_new_examples
    zero_data = self.cached_test_function(bytes(BUFFER_SIZE))
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:1051: in cached_test_function
    self.test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:208: in test_function
    self.__stoppable_test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:184: in __stoppable_test_function
    self._test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:725: in _execute_once_for_engine
    escalate_hypothesis_internal_error()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:699: in _execute_once_for_engine
    result = self.execute_once(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:637: in execute_once
    result = self.test_runner(data, run)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/executors.py:47: in default_new_style_executor
    return function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:633: in run
    return test(*args, **kwargs)
pytest_asyncio/plugin.py:432: in test_mark_inner
    def inner(**kwargs):
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:575: in test
    result = self.test(*args, **kwargs)
E   TypeError: inner() takes 0 positional arguments but 1 was given
---------------------------------- Hypothesis ----------------------------------
You can add @seed(111411370608096322521541188290288019729) to this test or run pytest with --hypothesis-seed=111411370608096322521541188290288019729 to reproduce this failure.
_______________________________ test_mark_outer ________________________________
tests/hypothesis/test_base.py:25: in test_mark_outer
    @given(st.integers())
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:470: in run
    self._run()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:872: in _run
    self.generate_new_examples()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:604: in generate_new_examples
    zero_data = self.cached_test_function(bytes(BUFFER_SIZE))
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:1051: in cached_test_function
    self.test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:208: in test_function
    self.__stoppable_test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:184: in __stoppable_test_function
    self._test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:725: in _execute_once_for_engine
    escalate_hypothesis_internal_error()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:699: in _execute_once_for_engine
    result = self.execute_once(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:637: in execute_once
    result = self.test_runner(data, run)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/executors.py:47: in default_new_style_executor
    return function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:633: in run
    return test(*args, **kwargs)
pytest_asyncio/plugin.py:432: in test_mark_outer
    def inner(**kwargs):
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:575: in test
    result = self.test(*args, **kwargs)
E   TypeError: inner() takes 0 positional arguments but 1 was given
---------------------------------- Hypothesis ----------------------------------
You can add @seed(205756024528203608188762276895564691856) to this test or run pytest with --hypothesis-seed=205756024528203608188762276895564691856 to reproduce this failure.
_________________________ test_mark_and_parametrize[1] _________________________
tests/hypothesis/test_base.py:31: in test_mark_and_parametrize
    @given(x=st.none())
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:470: in run
    self._run()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:872: in _run
    self.generate_new_examples()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:604: in generate_new_examples
    zero_data = self.cached_test_function(bytes(BUFFER_SIZE))
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:1051: in cached_test_function
    self.test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:208: in test_function
    self.__stoppable_test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:184: in __stoppable_test_function
    self._test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:725: in _execute_once_for_engine
    escalate_hypothesis_internal_error()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:699: in _execute_once_for_engine
    result = self.execute_once(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:637: in execute_once
    result = self.test_runner(data, run)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/executors.py:47: in default_new_style_executor
    return function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:633: in run
    return test(*args, **kwargs)
pytest_asyncio/plugin.py:432: in test_mark_and_parametrize
    def inner(**kwargs):
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:575: in test
    result = self.test(*args, **kwargs)
E   TypeError: inner() takes 0 positional arguments but 2 were given
---------------------------------- Hypothesis ----------------------------------
You can add @seed(205296931848593918963767617251055649187) to this test or run pytest with --hypothesis-seed=205296931848593918963767617251055649187 to reproduce this failure.
_________________________ test_mark_and_parametrize[2] _________________________
tests/hypothesis/test_base.py:31: in test_mark_and_parametrize
    @given(x=st.none())
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:470: in run
    self._run()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:870: in _run
    self.reuse_existing_examples()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:533: in reuse_existing_examples
    data = self.cached_test_function(existing)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:1051: in cached_test_function
    self.test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:208: in test_function
    self.__stoppable_test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:184: in __stoppable_test_function
    self._test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:725: in _execute_once_for_engine
    escalate_hypothesis_internal_error()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:699: in _execute_once_for_engine
    result = self.execute_once(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:637: in execute_once
    result = self.test_runner(data, run)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/executors.py:47: in default_new_style_executor
    return function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:633: in run
    return test(*args, **kwargs)
pytest_asyncio/plugin.py:432: in test_mark_and_parametrize
    def inner(**kwargs):
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:575: in test
    result = self.test(*args, **kwargs)
E   TypeError: inner() takes 0 positional arguments but 2 were given
---------------------------------- Hypothesis ----------------------------------
You can add @seed(144345173632399901148817170900088580288) to this test or run pytest with --hypothesis-seed=144345173632399901148817170900088580288 to reproduce this failure.
___________________ test_can_use_fixture_provided_event_loop ___________________
tests/hypothesis/test_base.py:39: in test_can_use_fixture_provided_event_loop
    @pytest.mark.asyncio
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:470: in run
    self._run()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:872: in _run
    self.generate_new_examples()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:604: in generate_new_examples
    zero_data = self.cached_test_function(bytes(BUFFER_SIZE))
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:1051: in cached_test_function
    self.test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:208: in test_function
    self.__stoppable_test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:184: in __stoppable_test_function
    self._test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:725: in _execute_once_for_engine
    escalate_hypothesis_internal_error()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:699: in _execute_once_for_engine
    result = self.execute_once(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:637: in execute_once
    result = self.test_runner(data, run)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/executors.py:47: in default_new_style_executor
    return function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:633: in run
    return test(*args, **kwargs)
pytest_asyncio/plugin.py:432: in test_can_use_fixture_provided_event_loop
    def inner(**kwargs):
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:575: in test
    result = self.test(*args, **kwargs)
E   TypeError: inner() takes 0 positional arguments but 2 were given
---------------------------------- Hypothesis ----------------------------------
You can add @seed(32806281167570098611214284431267867570) to this test or run pytest with --hypothesis-seed=32806281167570098611214284431267867570 to reproduce this failure.
____________________________ test_async_auto_marked ____________________________
/build/source/tests/hypothesis/test_base.py:64: in test_async_auto_marked
    result.assert_outcomes(passed=1)
E   AssertionError: assert {'errors': 0,...pped': 0, ...} == {'errors': 0,...pped': 0, ...}
E     Omitting 4 identical items, use -vv to show
E     Differing items:
E     {'passed': 0} != {'passed': 1}
E     {'failed': 1} != {'failed': 0}
E     Use -v to get the full diff
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform linux -- Python 3.9.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /build/pytest-of-nixbld/pytest-0/test_async_auto_marked0
plugins: asyncio-0.18.1, flaky-3.7.0, hypothesis-6.39.0
asyncio: mode=auto
collected 1 item

test_async_auto_marked.py F                                              [100%]

=================================== FAILURES ===================================
_______________________________ test_hypothesis ________________________________

    @given(n=st.integers())
>   async def test_hypothesis(n: int):

test_async_auto_marked.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:470: in run
    self._run()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:872: in _run
    self.generate_new_examples()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:604: in generate_new_examples
    zero_data = self.cached_test_function(bytes(BUFFER_SIZE))
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:1051: in cached_test_function
    self.test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:208: in test_function
    self.__stoppable_test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:184: in __stoppable_test_function
    self._test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:725: in _execute_once_for_engine
    escalate_hypothesis_internal_error()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:699: in _execute_once_for_engine
    result = self.execute_once(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:637: in execute_once
    result = self.test_runner(data, run)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/executors.py:47: in default_new_style_executor
    return function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:633: in run
    return test(*args, **kwargs)
/build/source/pytest_asyncio/plugin.py:432: in test_hypothesis
    def inner(**kwargs):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (0,), kwargs = {}, initial_draws = 1, start = 8032879.46620021

    @proxies(self.test)
    def test(*args, **kwargs):
        self.__test_runtime = None
        initial_draws = len(data.draw_times)
        start = time.perf_counter()
>       result = self.test(*args, **kwargs)
E       TypeError: inner() takes 0 positional arguments but 1 was given

/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:575: TypeError
---------------------------------- Hypothesis ----------------------------------
You can add @seed(5058031335671856716915173869561083396) to this test or run pytest with --hypothesis-seed=5058031335671856716915173869561083396 to reproduce this failure.
=========================== short test summary info ============================
FAILED test_async_auto_marked.py::test_hypothesis - TypeError: inner() takes ...
============================== 1 failed in 0.18s ===============================
___________________________ TestOne.test_hypothesis ____________________________
tests/hypothesis/test_inherited_test.py:8: in test_hypothesis
    @given(value=st.integers())
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:470: in run
    self._run()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:872: in _run
    self.generate_new_examples()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:604: in generate_new_examples
    zero_data = self.cached_test_function(bytes(BUFFER_SIZE))
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:1051: in cached_test_function
    self.test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:208: in test_function
    self.__stoppable_test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:184: in __stoppable_test_function
    self._test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:725: in _execute_once_for_engine
    escalate_hypothesis_internal_error()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:699: in _execute_once_for_engine
    result = self.execute_once(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:637: in execute_once
    result = self.test_runner(data, run)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/executors.py:47: in default_new_style_executor
    return function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:633: in run
    return test(*args, **kwargs)
pytest_asyncio/plugin.py:432: in test_hypothesis
    def inner(**kwargs):
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:575: in test
    result = self.test(*args, **kwargs)
E   TypeError: inner() takes 0 positional arguments but 2 were given
---------------------------------- Hypothesis ----------------------------------
You can add @seed(220747386016761914034003099428413956254) to this test or run pytest with --hypothesis-seed=220747386016761914034003099428413956254 to reproduce this failure.
___________________________ TestTwo.test_hypothesis ____________________________
tests/hypothesis/test_inherited_test.py:8: in test_hypothesis
    @given(value=st.integers())
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:470: in run
    self._run()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:870: in _run
    self.reuse_existing_examples()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:533: in reuse_existing_examples
    data = self.cached_test_function(existing)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:1051: in cached_test_function
    self.test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:208: in test_function
    self.__stoppable_test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/internal/conjecture/engine.py:184: in __stoppable_test_function
    self._test_function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:725: in _execute_once_for_engine
    escalate_hypothesis_internal_error()
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:699: in _execute_once_for_engine
    result = self.execute_once(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:637: in execute_once
    result = self.test_runner(data, run)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/executors.py:47: in default_new_style_executor
    return function(data)
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:633: in run
    return test(*args, **kwargs)
pytest_asyncio/plugin.py:432: in test_hypothesis
    def inner(**kwargs):
/nix/store/lrq051800ykl7b8ddqlm40p0l2mc75m1-python3.9-hypothesis-6.39.0/lib/python3.9/site-packages/hypothesis/core.py:575: in test
    result = self.test(*args, **kwargs)
E   TypeError: inner() takes 0 positional arguments but 2 were given
---------------------------------- Hypothesis ----------------------------------
You can add @seed(283343356983479488199690035036288948312) to this test or run pytest with --hypothesis-seed=283343356983479488199690035036288948312 to reproduce this failure.
=========================== short test summary info ============================
SKIPPED [1] tests/test_simple.py:238: Test a skip error inside asyncio
XFAIL tests/test_simple.py::test_asyncio_marker_fail
  need a failure
============== 8 failed, 64 passed, 1 skipped, 1 xfailed in 7.31s ==============

They all seem to boil down to this line:

E TypeError: inner() takes 0 positional arguments but 2 were given

Happy to test patches.

@mweinelt mweinelt changed the title Tests fail against hypothesis 6.39 Tests fail against hypothesis 6.39.0 Mar 2, 2022
@mweinelt
Copy link
Author

mweinelt commented Mar 2, 2022

@Zac-HD
Copy link
Member

Zac-HD commented Mar 3, 2022

I'm pretty sure (based on my own reading, and HypothesisWorks/hypothesis#3245 (comment)) that all this needs is to add *args in

def inner(**kwargs):
coro = func(**kwargs)

The underlying cause is some improved introspection in Hypothesis, which better-preserves signatures and can therefore call things with positional arguments. I'm planning to back this out as an incompatible change, but I'd recommend patching this anyway for futureproof-ness.

seifertm added a commit to seifertm/pytest-asyncio that referenced this issue Mar 3, 2022
This fixes a compatibility issue with Hypothesis 6.39.0.

Closes pytest-dev#302

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
@seifertm seifertm self-assigned this Mar 3, 2022
@seifertm
Copy link
Contributor

seifertm commented Mar 3, 2022

Thanks for the report! You already did all the digging and basically solved it :)

It definitely makes sense to accept *args in addition to **kwargs. It improves compatibilty and I don't see any harm in adding support for positional arguments.

seifertm added a commit that referenced this issue Mar 3, 2022
…r. (#303)

This fixes a compatibility issue with Hypothesis 6.39.0.

Closes #302

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
@seifertm
Copy link
Contributor

seifertm commented Mar 3, 2022

@mweinelt Would you mind testing again with the current master?
pip install --upgrade git+https://github.com/pytest-dev/pytest-asyncio.git

@mweinelt
Copy link
Author

mweinelt commented Mar 3, 2022

@seifertm Can confirm master works with hypothesis 6.39.0. Thank you!

@Zac-HD
Copy link
Member

Zac-HD commented Mar 3, 2022

Thanks for picking this up! We should have HypothesisWorks/hypothesis#3246 out in the morning, once Actions startup recovers and we can run our release process, at which point updating Hypothesis or pytest-asyncio will fix the problem 🙂

bors bot added a commit to microsoft/Qcodes that referenced this issue Oct 24, 2022
4754: Update pytest-asyncio requirement from ~=0.19.0 to ~=0.20.1 r=jenshnielsen a=dependabot[bot]

Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's releases</a>.</em></p>
<blockquote>
<h2>pytest-asyncio 0.20.1</h2>
<hr />
<h2>title: 'pytest-asyncio: pytest support for asyncio'</h2>
<p><a href="https://pypi.python.org/pypi/pytest-asyncio"><img src="https://img.shields.io/pypi/v/pytest-asyncio.svg" alt="image" /></a></p>
<p><a href="https://github.com/pytest-dev/pytest-asyncio/actions?workflow=CI"><img src="https://github.com/pytest-dev/pytest-asyncio/workflows/CI/badge.svg" alt="image" /></a></p>
<p><a href="https://codecov.io/gh/pytest-dev/pytest-asyncio"><img src="https://codecov.io/gh/pytest-dev/pytest-asyncio/branch/master/graph/badge.svg" alt="image" /></a></p>
<p><a href="https://github.com/pytest-dev/pytest-asyncio"><img src="https://img.shields.io/pypi/pyversions/pytest-asyncio.svg" alt="Supported Python versions" /></a></p>
<p><a href="https://github.com/ambv/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="image" /></a></p>
<p>pytest-asyncio is an Apache2 licensed library, written in Python, for
testing asyncio code with pytest.</p>
<p>asyncio code is usually written in the form of coroutines, which makes
it slightly more difficult to test using normal testing tools.
pytest-asyncio provides useful fixtures and markers to make testing
easier.</p>
<pre lang="{.sourceCode" data-meta=".python}"><code>`@pytest.mark.asyncio`
async def test_some_asyncio_code():
    res = await library.do_something()
    assert b&quot;expected result&quot; == res
</code></pre>
<p>pytest-asyncio has been strongly influenced by
<a href="https://github.com/eugeniy/pytest-tornado">pytest-tornado</a>.</p>
<h1>Features</h1>
<ul>
<li>fixtures for creating and injecting versions of the asyncio event
loop</li>
<li>fixtures for injecting unused tcp/udp ports</li>
<li>pytest markers for treating tests as asyncio coroutines</li>
<li>easy testing with non-default event loops</li>
<li>support for [async def]{.title-ref} fixtures and async generator
fixtures</li>
<li>support <em>auto</em> mode to handle all async fixtures and tests
automatically by asyncio; provide <em>strict</em> mode if a test suite
should work with different async frameworks simultaneously, e.g.
<code>asyncio</code> and <code>trio</code>.</li>
</ul>
<h1>Installation</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-asyncio/blob/master/CHANGELOG.rst">pytest-asyncio's changelog</a>.</em></p>
<blockquote>
<h1>0.20.1 (22-10-21)</h1>
<ul>
<li>Fixes an issue that warned about using an old version of pytest, even though the most recent version was installed. <code>[#430](pytest-dev/pytest-asyncio#430) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/430&gt;</code>_</li>
</ul>
<h1>0.20.0 (22-10-21)</h1>
<ul>
<li>BREAKING: Removed <em>legacy</em> mode. If you're upgrading from v0.19 and you haven't configured <code>asyncio_mode = legacy</code>, you can upgrade without taking any additional action. If you're upgrading from an earlier version or you have explicitly enabled <em>legacy</em> mode, you need to switch to <em>auto</em> or <em>strict</em> mode before upgrading to this version.</li>
<li>Deprecate use of pytest v6.</li>
<li>Fixed an issue which prevented fixture setup from being cached. <code>[#404](pytest-dev/pytest-asyncio#404) &lt;https://github.com/pytest-dev/pytest-asyncio/pull/404&gt;</code>_</li>
</ul>
<h1>0.19.0 (22-07-13)</h1>
<ul>
<li>BREAKING: The default <code>asyncio_mode</code> is now <em>strict</em>. <code>[#293](pytest-dev/pytest-asyncio#293) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/293&gt;</code>_</li>
<li>Removes <code>setup.py</code> since all relevant configuration is present <code>setup.cfg</code>. Users requiring an editable installation of pytest-asyncio need to use pip v21.1 or newer. <code>[#283](pytest-dev/pytest-asyncio#283) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/283&gt;</code>_</li>
<li>Declare support for Python 3.11.</li>
</ul>
<h1>0.18.3 (22-03-25)</h1>
<ul>
<li>Adds <code>pytest-trio &lt;https://pypi.org/project/pytest-trio/&gt;</code>_ to the test dependencies</li>
<li>Fixes a bug that caused pytest-asyncio to try to set up async pytest_trio fixtures in strict mode. <code>[#298](pytest-dev/pytest-asyncio#298) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/298&gt;</code>_</li>
</ul>
<h1>0.18.2 (22-03-03)</h1>
<ul>
<li>Fix asyncio auto mode not marking static methods. <code>[#295](pytest-dev/pytest-asyncio#295) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/295&gt;</code>_</li>
<li>Fix a compatibility issue with Hypothesis 6.39.0. <code>[#302](pytest-dev/pytest-asyncio#302) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/302&gt;</code>_</li>
</ul>
<h1>0.18.1 (22-02-10)</h1>
<ul>
<li>Fixes a regression that prevented async fixtures from working in synchronous tests. <code>[#286](pytest-dev/pytest-asyncio#286) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/286&gt;</code>_</li>
</ul>
<h1>0.18.0 (22-02-07)</h1>
<ul>
<li>Raise a warning if <a href="https://github.com/pytest"><code>`@​pytest</code></a>.mark.asyncio` is applied to non-async function. <code>[#275](pytest-dev/pytest-asyncio#275) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/275&gt;</code>_</li>
<li>Support parametrized <code>event_loop</code> fixture. <code>[#278](pytest-dev/pytest-asyncio#278) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/278&gt;</code>_</li>
</ul>
<h1>0.17.2 (22-01-17)</h1>
<ul>
<li>Require <code>typing-extensions</code> on Python<!-- raw HTML omitted -->`_</li>
<li>Fix a regression in tests collection introduced by 0.17.1, the plugin works fine with non-python tests again. <code>[#267](pytest-dev/pytest-asyncio#267) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/267&gt;</code>_</li>
</ul>
<h1>0.17.1 (22-01-16)</h1>
<ul>
<li>Fixes a bug that prevents async Hypothesis tests from working without explicit <code>asyncio</code> marker when <code>--asyncio-mode=auto</code> is set. <code>[#258](pytest-dev/pytest-asyncio#258) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/258&gt;</code>_</li>
<li>Fixed a bug that closes the default event loop if the loop doesn't exist <code>[#257](pytest-dev/pytest-asyncio#257) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/257&gt;</code>_</li>
<li>Added type annotations. <code>[#198](pytest-dev/pytest-asyncio#198) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/198&gt;</code>_</li>
<li>Show asyncio mode in pytest report headers. <code>[#266](pytest-dev/pytest-asyncio#266) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/266&gt;</code>_</li>
<li>Relax <code>asyncio_mode</code> type definition; it allows to support pytest 6.1+. <code>[#262](pytest-dev/pytest-asyncio#262) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/262&gt;</code>_</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/c8d017407d39dd81d6864fa9a58ba1240d54be9f"><code>c8d0174</code></a> fix: Do not warn about outdated pytest version when pytest&gt;=7 is installed. (...</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/6450ddbe974f5359d56317ba8bdda8b2ab48655a"><code>6450ddb</code></a> Prepare release of v0.20.0. (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/428">#428</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/150f29c107fbd76641de47e040d43840769ef92c"><code>150f29c</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/427">#427</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/adc88090f341d9872e9e9b4d22a94cdadf60b3bc"><code>adc8809</code></a> Build(deps): Bump typing-extensions in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/425">#425</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/4abf9d1df228ed8b083721d7affa73e4a08d13c3"><code>4abf9d1</code></a> Build(deps): Bump zipp from 3.8.1 to 3.9.0 in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/424">#424</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/eb487bcb076f44dedcdb33e74972bf06c37027ee"><code>eb487bc</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/423">#423</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/907c461f172e52159a595e2592176c7feac04a43"><code>907c461</code></a> Refactor pytest_pycollect_makeitems (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/421">#421</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/d45ab217c80117854b510edc6c9fdd457b6b07fc"><code>d45ab21</code></a> feat: Add deprecation warning for pytest &lt; 7. (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/420">#420</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/cab20f4d346e9e52e5ffc93854de3ec881e7d342"><code>cab20f4</code></a> Build(deps): Bump importlib-metadata in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/415">#415</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/d9f77567189c96536b39b43520f4b40895b34fb9"><code>d9f7756</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/416">#416</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.19.0...v0.20.1">compare view</a></li>
</ul>
</details>
<br />


You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

4755: Bump actions/upload-artifact from 3.1.0 to 3.1.1 r=jenshnielsen a=dependabot[bot]

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.0 to 3.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p>
<blockquote>
<h2>v3.1.1</h2>
<ul>
<li>Update actions/core package to latest version to remove <code>set-output</code> deprecation warning <a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/351">#351</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/actions/upload-artifact/commit/83fd05a356d7e2593de66fc9913b3002723633cb"><code>83fd05a</code></a> Bump actions-core to v1.10.0 (<a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/356">#356</a>)</li>
<li>See full diff in <a href="https://github.com/actions/upload-artifact/compare/v3.1.0...v3.1.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=3.1.0&new-version=3.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
bors bot added a commit to microsoft/Qcodes that referenced this issue Oct 24, 2022
4754: Update pytest-asyncio requirement from ~=0.19.0 to ~=0.20.1 r=jenshnielsen a=dependabot[bot]

Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's releases</a>.</em></p>
<blockquote>
<h2>pytest-asyncio 0.20.1</h2>
<hr />
<h2>title: 'pytest-asyncio: pytest support for asyncio'</h2>
<p><a href="https://pypi.python.org/pypi/pytest-asyncio"><img src="https://img.shields.io/pypi/v/pytest-asyncio.svg" alt="image" /></a></p>
<p><a href="https://github.com/pytest-dev/pytest-asyncio/actions?workflow=CI"><img src="https://github.com/pytest-dev/pytest-asyncio/workflows/CI/badge.svg" alt="image" /></a></p>
<p><a href="https://codecov.io/gh/pytest-dev/pytest-asyncio"><img src="https://codecov.io/gh/pytest-dev/pytest-asyncio/branch/master/graph/badge.svg" alt="image" /></a></p>
<p><a href="https://github.com/pytest-dev/pytest-asyncio"><img src="https://img.shields.io/pypi/pyversions/pytest-asyncio.svg" alt="Supported Python versions" /></a></p>
<p><a href="https://github.com/ambv/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="image" /></a></p>
<p>pytest-asyncio is an Apache2 licensed library, written in Python, for
testing asyncio code with pytest.</p>
<p>asyncio code is usually written in the form of coroutines, which makes
it slightly more difficult to test using normal testing tools.
pytest-asyncio provides useful fixtures and markers to make testing
easier.</p>
<pre lang="{.sourceCode" data-meta=".python}"><code>`@pytest.mark.asyncio`
async def test_some_asyncio_code():
    res = await library.do_something()
    assert b&quot;expected result&quot; == res
</code></pre>
<p>pytest-asyncio has been strongly influenced by
<a href="https://github.com/eugeniy/pytest-tornado">pytest-tornado</a>.</p>
<h1>Features</h1>
<ul>
<li>fixtures for creating and injecting versions of the asyncio event
loop</li>
<li>fixtures for injecting unused tcp/udp ports</li>
<li>pytest markers for treating tests as asyncio coroutines</li>
<li>easy testing with non-default event loops</li>
<li>support for [async def]{.title-ref} fixtures and async generator
fixtures</li>
<li>support <em>auto</em> mode to handle all async fixtures and tests
automatically by asyncio; provide <em>strict</em> mode if a test suite
should work with different async frameworks simultaneously, e.g.
<code>asyncio</code> and <code>trio</code>.</li>
</ul>
<h1>Installation</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-asyncio/blob/master/CHANGELOG.rst">pytest-asyncio's changelog</a>.</em></p>
<blockquote>
<h1>0.20.1 (22-10-21)</h1>
<ul>
<li>Fixes an issue that warned about using an old version of pytest, even though the most recent version was installed. <code>[#430](pytest-dev/pytest-asyncio#430) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/430&gt;</code>_</li>
</ul>
<h1>0.20.0 (22-10-21)</h1>
<ul>
<li>BREAKING: Removed <em>legacy</em> mode. If you're upgrading from v0.19 and you haven't configured <code>asyncio_mode = legacy</code>, you can upgrade without taking any additional action. If you're upgrading from an earlier version or you have explicitly enabled <em>legacy</em> mode, you need to switch to <em>auto</em> or <em>strict</em> mode before upgrading to this version.</li>
<li>Deprecate use of pytest v6.</li>
<li>Fixed an issue which prevented fixture setup from being cached. <code>[#404](pytest-dev/pytest-asyncio#404) &lt;https://github.com/pytest-dev/pytest-asyncio/pull/404&gt;</code>_</li>
</ul>
<h1>0.19.0 (22-07-13)</h1>
<ul>
<li>BREAKING: The default <code>asyncio_mode</code> is now <em>strict</em>. <code>[#293](pytest-dev/pytest-asyncio#293) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/293&gt;</code>_</li>
<li>Removes <code>setup.py</code> since all relevant configuration is present <code>setup.cfg</code>. Users requiring an editable installation of pytest-asyncio need to use pip v21.1 or newer. <code>[#283](pytest-dev/pytest-asyncio#283) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/283&gt;</code>_</li>
<li>Declare support for Python 3.11.</li>
</ul>
<h1>0.18.3 (22-03-25)</h1>
<ul>
<li>Adds <code>pytest-trio &lt;https://pypi.org/project/pytest-trio/&gt;</code>_ to the test dependencies</li>
<li>Fixes a bug that caused pytest-asyncio to try to set up async pytest_trio fixtures in strict mode. <code>[#298](pytest-dev/pytest-asyncio#298) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/298&gt;</code>_</li>
</ul>
<h1>0.18.2 (22-03-03)</h1>
<ul>
<li>Fix asyncio auto mode not marking static methods. <code>[#295](pytest-dev/pytest-asyncio#295) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/295&gt;</code>_</li>
<li>Fix a compatibility issue with Hypothesis 6.39.0. <code>[#302](pytest-dev/pytest-asyncio#302) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/302&gt;</code>_</li>
</ul>
<h1>0.18.1 (22-02-10)</h1>
<ul>
<li>Fixes a regression that prevented async fixtures from working in synchronous tests. <code>[#286](pytest-dev/pytest-asyncio#286) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/286&gt;</code>_</li>
</ul>
<h1>0.18.0 (22-02-07)</h1>
<ul>
<li>Raise a warning if <a href="https://github.com/pytest"><code>`@​pytest</code></a>.mark.asyncio` is applied to non-async function. <code>[#275](pytest-dev/pytest-asyncio#275) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/275&gt;</code>_</li>
<li>Support parametrized <code>event_loop</code> fixture. <code>[#278](pytest-dev/pytest-asyncio#278) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/278&gt;</code>_</li>
</ul>
<h1>0.17.2 (22-01-17)</h1>
<ul>
<li>Require <code>typing-extensions</code> on Python<!-- raw HTML omitted -->`_</li>
<li>Fix a regression in tests collection introduced by 0.17.1, the plugin works fine with non-python tests again. <code>[#267](pytest-dev/pytest-asyncio#267) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/267&gt;</code>_</li>
</ul>
<h1>0.17.1 (22-01-16)</h1>
<ul>
<li>Fixes a bug that prevents async Hypothesis tests from working without explicit <code>asyncio</code> marker when <code>--asyncio-mode=auto</code> is set. <code>[#258](pytest-dev/pytest-asyncio#258) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/258&gt;</code>_</li>
<li>Fixed a bug that closes the default event loop if the loop doesn't exist <code>[#257](pytest-dev/pytest-asyncio#257) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/257&gt;</code>_</li>
<li>Added type annotations. <code>[#198](pytest-dev/pytest-asyncio#198) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/198&gt;</code>_</li>
<li>Show asyncio mode in pytest report headers. <code>[#266](pytest-dev/pytest-asyncio#266) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/266&gt;</code>_</li>
<li>Relax <code>asyncio_mode</code> type definition; it allows to support pytest 6.1+. <code>[#262](pytest-dev/pytest-asyncio#262) &lt;https://github.com/pytest-dev/pytest-asyncio/issues/262&gt;</code>_</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/c8d017407d39dd81d6864fa9a58ba1240d54be9f"><code>c8d0174</code></a> fix: Do not warn about outdated pytest version when pytest&gt;=7 is installed. (...</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/6450ddbe974f5359d56317ba8bdda8b2ab48655a"><code>6450ddb</code></a> Prepare release of v0.20.0. (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/428">#428</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/150f29c107fbd76641de47e040d43840769ef92c"><code>150f29c</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/427">#427</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/adc88090f341d9872e9e9b4d22a94cdadf60b3bc"><code>adc8809</code></a> Build(deps): Bump typing-extensions in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/425">#425</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/4abf9d1df228ed8b083721d7affa73e4a08d13c3"><code>4abf9d1</code></a> Build(deps): Bump zipp from 3.8.1 to 3.9.0 in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/424">#424</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/eb487bcb076f44dedcdb33e74972bf06c37027ee"><code>eb487bc</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/423">#423</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/907c461f172e52159a595e2592176c7feac04a43"><code>907c461</code></a> Refactor pytest_pycollect_makeitems (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/421">#421</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/d45ab217c80117854b510edc6c9fdd457b6b07fc"><code>d45ab21</code></a> feat: Add deprecation warning for pytest &lt; 7. (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/420">#420</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/cab20f4d346e9e52e5ffc93854de3ec881e7d342"><code>cab20f4</code></a> Build(deps): Bump importlib-metadata in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/415">#415</a>)</li>
<li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/d9f77567189c96536b39b43520f4b40895b34fb9"><code>d9f7756</code></a> Build(deps): Bump hypothesis in /dependencies/default (<a href="https://github-redirect.dependabot.com/pytest-dev/pytest-asyncio/issues/416">#416</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.19.0...v0.20.1">compare view</a></li>
</ul>
</details>
<br />


You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants