You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Async test functions aren't awaited on python 3.11 when annotated with a DDT decorator. Consequently, such tests will always pass. This can be reproduced with the following minimal example:
Executing this test case results in the following warnings:
==================================================================== test session starts =====================================================================
platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0
rootdir: /home/soldag/ddt-test
collected 1 item
test_ddt.py . [100%]
====================================================================== warnings summary ======================================================================
test_ddt.py::TestDdt::test_ddt_1_1
/usr/lib/python3.11/unittest/async_case.py:90: RuntimeWarning: coroutine 'TestDdt.test_ddt' was never awaited
if self._callMaybeAsync(method) is not 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.
test_ddt.py::TestDdt::test_ddt_1_1
/usr/lib/python3.11/unittest/case.py:678: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestDdt.test_ddt of <test_ddt.TestDdt testMethod=test_ddt_1_1>>)
return self.run(*args, **kwds)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================================== 1 passed, 2 warnings in 0.05s ================================================================
The text was updated successfully, but these errors were encountered:
* Add async flag when wrapping async function
* Pin Ubuntu version
* Pin Ubuntu version to 18.04
* Update Python action version
* Drop support for Python 2.7
* Fix async tests for python 3.7
---------
Co-authored-by: Vsevolod Glumov <seva17@gmail.com>
Async test functions aren't awaited on python 3.11 when annotated with a DDT decorator. Consequently, such tests will always pass. This can be reproduced with the following minimal example:
Executing this test case results in the following warnings:
The text was updated successfully, but these errors were encountered: