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
Running the asynctest unittests under Python 3.9 yields a bunch of test case failures.
Example:
======================================================================
ERROR: test_patch_generator_with_multiple_scopes (test.Test_patch_decorator_coroutine_or_generator_scope)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/asynctest-0.13.0/test/test_mock.py", line 1650, in test_patch_generator_with_multiple_scopes
self.assertEqual((True, True), next(gen))
File "/builddir/build/BUILD/asynctest-0.13.0/asynctest/mock.py", line 995, in patched_generator
return (yield from patched_factory(*args, **kwargs))
File "/builddir/build/BUILD/asynctest-0.13.0/asynctest/mock.py", line 985, in patched_factory
patching.__exit__(*exc_info)
File "/usr/lib/python3.9/unittest/mock.py", line 1536, in __exit__
return exit_stack.__exit__(*exc_info)
File "/usr/lib/python3.9/contextlib.py", line 471, in __exit__
received_exc = exc_details[0] is not None
IndexError: tuple index out of range
======================================================================
ERROR: test_deactivate_patch_when_generator_exec_fails (test.Test_patch_decorator_coroutine_or_generator_scope_GLOBAL)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/asynctest-0.13.0/test/test_mock.py", line 1739, in test_deactivate_patch_when_generator_exec_fails
self._test_deactivate_patch_when_generator_exec_fails(asynctest.GLOBAL)
File "/builddir/build/BUILD/asynctest-0.13.0/test/test_mock.py", line 1348, in _test_deactivate_patch_when_generator_exec_fails
run_coroutine(tester())
File "/builddir/build/BUILD/asynctest-0.13.0/test/utils.py", line 9, in run_coroutine
return loop.run_until_complete(coroutine)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/builddir/build/BUILD/asynctest-0.13.0/test/test_mock.py", line 1341, in tester
yield from a_coroutine()
File "/builddir/build/BUILD/asynctest-0.13.0/asynctest/mock.py", line 995, in patched_generator
return (yield from patched_factory(*args, **kwargs))
File "/builddir/build/BUILD/asynctest-0.13.0/asynctest/mock.py", line 1044, in __next__
self._stop_global_patchings()
File "/builddir/build/BUILD/asynctest-0.13.0/asynctest/mock.py", line 1032, in _stop_global_patchings
if _is_started(patching):
File "/builddir/build/BUILD/asynctest-0.13.0/asynctest/mock.py", line 124, in _is_started
return unittest.mock._is_started(patching)
AttributeError: module 'unittest.mock' has no attribute '_is_started'
-------------------- >> begin captured logging << --------------------
asyncio: DEBUG: Using selector: EpollSelector
--------------------- >> end captured logging << ---------------------
[..]
======================================================================
FAIL: test_patch_as_decorator_uses_CoroutineMock_on_async_coroutine_function (test.test_mock.Test_patch)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/asynctest-0.13.0/test/test_mock.py", line 940, in test_patch_as_decorator_uses_CoroutineMock_on_async_coroutine_function
test_mock_coroutine()
File "/usr/lib/python3.9/unittest/mock.py", line 1337, in patched
return func(*newargs, **newkeywargs)
File "/builddir/build/BUILD/asynctest-0.13.0/test/test_mock.py", line 937, in test_mock_coroutine
self.assertIsInstance(mock, asynctest.mock.CoroutineMock)
AssertionError: <MagicMock name='an_async_coroutine' id='4125941040'> is not an instance of <class 'asynctest.mock.CoroutineMock'>
Running the asynctest unittests under Python 3.9 yields a bunch of test case failures.
Example:
See https://kojipkgs.fedoraproject.org//work/tasks/8916/45078916/build.log for the full log.
The
_is_started
error is already reported in #149.The text was updated successfully, but these errors were encountered: