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
I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
because I'm calling build with --no-isolation I'm using during all processes oly locally installed modules
install .whl file in </install/prefix>
run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages+ /usr/bin/pytest -ra=========================================================================== test session starts ============================================================================platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0rootdir: /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0plugins: cov-3.0.0, httpbin-1.0.1, anyio-3.3.4collected 231 itemsdoc/examples/tutorial/test_cases.py .......F [ 3%]test/test_case.py .F.......................................... [ 22%]test/test_helpers.py ... [ 23%]test/test_mock.py .................................................................F..F.....................F.Exception ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'FFFException ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'Exception ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'FF.FException ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'F.F..Exception ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'FFFFF.FFFFFException ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'FFFException ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'FFFFException ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'Exception ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'FFException ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'Exception ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'FFFException ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'Exception ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'Exception ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0>Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching)AttributeError: module 'unittest.mock' has no attribute '_is_started'FFFFFFF.......FF... [ 87%]FFFFF. [ 89%]test/test_selector.py ...................F.... [100%]================================================================================= FAILURES =================================================================================______________________________________________________ AnExempleWhichDetectsPendingCallbacks.test_missing_a_callback _______________________________________________________../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:300: in run self._tearDown()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:262: in _tearDown self._checker.check_test(self)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/_fail_on.py:90: in check_test getattr(self, check)(case)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/_fail_on.py:111: in active_handles case.fail("Loop contained unfinished work {!r}".format(handles))E AssertionError: Loop contained unfinished work (<TimerHandle when=334114.971793352 AnExempleWhichDetectsPendingCallbacks.i_must_run()>,)_____________________________________________________________________ Test.LoggingTestCase.test_basic ______________________________________________________________________self = <test.test_case.Test.LoggingTestCase testMethod=runTest>, result = <TestCaseFunction test_basic> def run(self, result=None): orig_result = result if result is None: result = self.defaultTestResult() startTestRun = getattr(result, 'startTestRun', None) if startTestRun is not None: startTestRun() result.startTest(self)
> testMethod = getattr(self, self._testMethodName)E AttributeError: 'LoggingTestCase' object has no attribute 'runTest'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:275: AttributeError________________________________________________________ Test_CoroutineMock_awaited.test_awaited_from_autospec_mock ________________________________________________________self = <test.test_mock.Test_CoroutineMock_awaited testMethod=test_awaited_from_autospec_mock> @asyncio.coroutine def test_awaited_from_autospec_mock(self): mock = asynctest.mock.create_autospec(Test) self.assertFalse(mock.a_coroutine.awaited) self.assertEqual(0, mock.a_coroutine.await_count) yield from mock.a_coroutine() self.assertTrue(mock.a_coroutine.awaited)
> self.assertEqual(1, mock.a_coroutine.await_count)E AssertionError: 1 != 2test/test_mock.py:577: AssertionError__________________________________________ Test_CoroutineMock_awaited.test_create_autospec_on_coroutine_and_using_assert_methods ___________________________________________self = <test.test_mock.Test_CoroutineMock_awaited testMethod=test_create_autospec_on_coroutine_and_using_assert_methods> def test_create_autospec_on_coroutine_and_using_assert_methods(self): mock = asynctest.create_autospec(Test.a_coroutine_with_args) mock.assert_not_awaited() yield from mock("arg0", "arg1", "arg2") mock.assert_awaited() # calls assert not awaited
> mock.assert_awaited_once()test/test_mock.py:778:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <CoroutineMock spec='function' id='140467053821424'> def assert_awaited_once(self): """ Assert that the mock was awaited exactly once. """ if not self.await_count == 1: msg = (f"Expected {self._mock_name or 'mock'} to have been awaited once." f" Awaited {self.await_count} times.")
> raise AssertionError(msg)E AssertionError: Expected mock to have been awaited once. Awaited 2 times./usr/lib64/python3.8/unittest/mock.py:2168: AssertionError____________________________________________________ Test_patch.test_patch_is_enabled_when_running_decorated_coroutine _____________________________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc108f02940> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)E StopIteration: True../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041: StopIterationDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch testMethod=test_patch_is_enabled_when_running_decorated_coroutine> def test_patch_is_enabled_when_running_decorated_coroutine(self): with self.subTest("old style coroutine"): @patch_is_patched() @asyncio.coroutine def a_coroutine(): import test.test_mock return test.test_mock.Test().is_patched()
> self.assertTrue(run_coroutine(a_coroutine()))test/test_mock.py:975:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc108ed8160> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError______________________________________________ Test_patch_decorator_coroutine_or_generator.test_coroutine_arg_is_default_mock ______________________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc1082e1400> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)E StopIteration: (True, True)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041: StopIterationDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_decorator_coroutine_or_generator testMethod=test_coroutine_arg_is_default_mock> def test_coroutine_arg_is_default_mock(self): @asyncio.coroutine def tester(coroutine_function): loop = asyncio.get_event_loop() fut = asyncio.Future(loop=loop) loop.call_soon(fut.set_result, None) before, after = yield from coroutine_function(fut) self.assertTrue(before) self.assertTrue(after) def is_instance_of_mock(obj): return isinstance(obj, asynctest.mock.Mock) def is_same_mock(obj): import test.test_mock return obj is test.test_mock.Test with self.subTest("old style coroutine"): @asynctest.mock.patch('test.test_mock.Test') def a_coroutine(fut, mock): before = is_instance_of_mock(mock) yield from fut after = is_same_mock(mock) return before, after
> run_coroutine(tester(a_coroutine))test/test_mock.py:1066:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()test/test_mock.py:1047: in tester before, after = yield from coroutine_function(fut)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc1082e1b50> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError_______________________________________________ Test_patch_decorator_coroutine_or_generator.test_coroutine_type_when_patched _______________________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator testMethod=test_coroutine_type_when_patched> def test_coroutine_type_when_patched(self): with self.subTest("old style coroutine"): a_coroutine = Test.a_staticmethod_coroutine a_patched_coroutine = patch_is_patched()(a_coroutine) self.assertEqual(asyncio.iscoroutinefunction(a_patched_coroutine), asyncio.iscoroutinefunction(a_coroutine)) self.assertEqual(inspect.isgeneratorfunction(a_patched_coroutine), inspect.isgeneratorfunction(a_coroutine)) coro = a_coroutine() patched_coro = a_patched_coroutine() try: self.assertEqual(asyncio.iscoroutine(patched_coro), asyncio.iscoroutine(coro)) finally:
> run_coroutine(coro)test/test_mock.py:1010:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:595: in run_until_complete future = tasks.ensure_future(future, loop=self)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _coro_or_future = <MagicMock name='Test.a_staticmethod_coroutine()' id='140467053821808'> def ensure_future(coro_or_future, *, loop=None): """Wrap a coroutine or an awaitable in a future. If the argument is a Future, it is returned directly. """ if coroutines.iscoroutine(coro_or_future): if loop is None: loop = events.get_event_loop() task = loop.create_task(coro_or_future) if task._source_traceback: del task._source_traceback[-1] return task elif futures.isfuture(coro_or_future): if loop is not None and loop is not futures._get_loop(coro_or_future): raise ValueError('The future belongs to a different loop than ' 'the one specified as the loop argument') return coro_or_future elif inspect.isawaitable(coro_or_future): return ensure_future(_wrap_awaitable(coro_or_future), loop=loop) else:
> raise TypeError('An asyncio.Future, a coroutine or an awaitable is ' 'required')E TypeError: An asyncio.Future, a coroutine or an awaitable is required/usr/lib64/python3.8/asyncio/tasks.py:684: TypeError______________________________________________ Test_patch_decorator_coroutine_or_generator.test_generator_arg_is_default_mock ______________________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc108efd460> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)E StopIteration../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041: StopIterationDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_decorator_coroutine_or_generator testMethod=test_generator_arg_is_default_mock> def test_generator_arg_is_default_mock(self): @asynctest.mock.patch('test.test_mock.Test') def a_generator(mock): self.assertIsInstance(mock, asynctest.mock.Mock) yield import test.test_mock self.assertIs(mock, test.test_mock.Test)
> for_ina_generator():test/test_mock.py:1038:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc1083392e0> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError____________________________________________________ Test_patch_object.test_patch_coroutine_function_with_CoroutineMock ____________________________________________________self = <test.test_mock.Test_patch_object testMethod=test_patch_coroutine_function_with_CoroutineMock> def test_patch_coroutine_function_with_CoroutineMock(self): with asynctest.mock.patch.object(Test(), 'a_coroutine') as mock:
> self.assertIsInstance(mock, asynctest.mock.CoroutineMock)E AssertionError: <MagicMock name='a_coroutine' id='140467054488448'> is not an instance of <class 'asynctest.mock.CoroutineMock'>test/test_mock.py:1091: AssertionError_____________________________________________________________ Test_patch_object.test_patch_decorates_coroutine _____________________________________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc108d91ca0> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)E StopIteration: True../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041: StopIterationDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_object testMethod=test_patch_decorates_coroutine> def test_patch_decorates_coroutine(self): obj = Test() with self.subTest("old style coroutine"): @asynctest.patch.object(obj, "is_patched", new=lambda: True) @asyncio.coroutine def a_coroutine(): return obj.is_patched()
> self.assertTrue(run_coroutine(a_coroutine()))test/test_mock.py:1105:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc108d91d30> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError___________________________________________________ Test_patch_multiple.test_patch_coroutine_function_with_CoroutineMock ___________________________________________________self = <test.test_mock.Test_patch_multiple testMethod=test_patch_coroutine_function_with_CoroutineMock> def test_patch_coroutine_function_with_CoroutineMock(self): default = asynctest.mock.DEFAULT with asynctest.mock.patch.multiple('test.test_mock.Test', a_function=default, a_coroutine=default, an_async_coroutine=default): import test.test_mock obj = test.test_mock.Test() self.assertIsInstance(obj.a_function, asynctest.mock.MagicMock)
> self.assertIsInstance(obj.a_coroutine, asynctest.mock.CoroutineMock)E AssertionError: <MagicMock name='Test().a_coroutine' id='140467053723264'> is not an instance of <class 'asynctest.mock.CoroutineMock'>test/test_mock.py:1132: AssertionError____________________________________________________________ Test_patch_multiple.test_patch_decorates_coroutine ____________________________________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc108ec1d90> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)E StopIteration: True../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041: StopIterationDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_multiple testMethod=test_patch_decorates_coroutine> def test_patch_decorates_coroutine(self): with self.subTest("old style coroutine"): @asynctest.mock.patch.multiple("test.test_mock.Test", is_patched=lambda self: True) @asyncio.coroutine def a_coroutine(): import test.test_mock return test.test_mock.Test().is_patched()
> self.assertTrue(run_coroutine(a_coroutine()))test/test_mock.py:1144:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc10901feb0> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError________________________________________________________________ Test_patch_dict.test_patch_decorates_class ________________________________________________________________self = <test.test_mock.Test_patch_dict testMethod=test_patch_decorates_class> def test_patch_decorates_class(self): import test.test_mock @patch_dict_is_patched() class Patched: @asyncio.coroutine def test_a_coroutine(self): return test.test_mock.Test().a_dict['is_patched'] def test_a_function(self): return test.test_mock.Test().a_dict['is_patched'] instance = Patched()
> self.assertFalse(test.test_mock.Test().a_dict['is_patched'])E AssertionError: <MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'> is not falsetest/test_mock.py:1196: AssertionError_______________________________________________________________ Test_patch_autospec.test_autospec_coroutine ________________________________________________________________self = <test.test_mock.Test_patch_autospec testMethod=test_autospec_coroutine> def test_autospec_coroutine(self): called = False @asynctest.mock.patch(self.test_class_path, autospec=True) def patched(mock): nonlocal called called = True self.assertIsInstance(mock.a_coroutine, asynctest.mock.CoroutineMock) self.assertIsInstance(mock().a_coroutine, asynctest.mock.CoroutineMock) self.assertIsInstance(mock.a_function, asynctest.mock.Mock) self.assertIsInstance(mock().a_function, asynctest.mock.Mock) self.assertIsInstance(mock.an_async_coroutine, asynctest.mock.CoroutineMock) self.assertIsInstance(mock().an_async_coroutine, asynctest.mock.CoroutineMock)
> patched()test/test_mock.py:1224:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/usr/lib64/python3.8/unittest/mock.py:1325: in patched return func(*newargs, **newkeywargs)test/test_mock.py:1213: in patched self.assertIsInstance(mock.a_coroutine,E AssertionError: <MagicMock name='Test.a_coroutine' spec='MagicMock' id='140467053499872'> is not an instance of <class 'asynctest.mock.CoroutineMock'>_______________________________________________________ Test_patch_autospec.test_patch_autospec_with_patches_on_top ________________________________________________________self = <test.test_mock.Test_patch_autospec testMethod=test_patch_autospec_with_patches_on_top> def test_patch_autospec_with_patches_on_top(self): called = False @asynctest.mock.patch("{}.{}".format(self.test_class_path, "is_patched"), return_value=True) @asynctest.mock.patch("{}.{}".format(self.test_class_path, "a_coroutine"), autospec=True) def patched_function(coroutine_mock, is_patched_mock): nonlocal called called = True self.assertIsInstance(Test.is_patched, asynctest.mock.Mock) self.assertTrue(Test.is_patched()) self.assertTrue(asyncio.iscoroutinefunction(coroutine_mock)) self.assertTrue(asyncio.iscoroutinefunction(Test.a_coroutine))
> patched_function()test/test_mock.py:1243:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/usr/lib64/python3.8/unittest/mock.py:1325: in patched return func(*newargs, **newkeywargs)test/test_mock.py:1240: in patched_function self.assertTrue(asyncio.iscoroutinefunction(coroutine_mock))E AssertionError: False is not true________________________________________________________ Test_patch_autospec.test_patch_autospec_with_patches_under ________________________________________________________self = <test.test_mock.Test_patch_autospec testMethod=test_patch_autospec_with_patches_under> def test_patch_autospec_with_patches_under(self): called = False @asynctest.mock.patch("{}.{}".format(self.test_class_path, "a_coroutine"), autospec=True) @asynctest.mock.patch("{}.{}".format(self.test_class_path, "is_patched"), return_value=True) def patched_function(is_patched_mock, coroutine_mock): nonlocal called called = True self.assertIsInstance(Test.is_patched, asynctest.mock.Mock) self.assertTrue(Test.is_patched()) self.assertTrue(asyncio.iscoroutinefunction(coroutine_mock)) self.assertTrue(asyncio.iscoroutinefunction(Test.a_coroutine))
> patched_function()test/test_mock.py:1262:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/usr/lib64/python3.8/unittest/mock.py:1325: in patched return func(*newargs, **newkeywargs)test/test_mock.py:1259: in patched_function self.assertTrue(asyncio.iscoroutinefunction(coroutine_mock))E AssertionError: False is not true_____________________________________________________________ Test_patch_autospec.test_patch_multiple_autospec _____________________________________________________________TypeError: An asyncio.Future, a coroutine or an awaitable is requiredDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_autospec testMethod=test_patch_multiple_autospec> def test_patch_multiple_autospec(self): called = False default = asynctest.mock.DEFAULT @asynctest.mock.patch.multiple(Test, autospec=True, a_coroutine=default, a_coroutine_with_args=default) def patched_function(**patched): nonlocal called called = True with self.assertRaisesRegex(TypeError, "arg2"): run_coroutine(Test().a_coroutine_with_args("arg")) test = Test() self.assertTrue(run_coroutine(test.a_coroutine())) self.assertTrue(run_coroutine(test.a_coroutine_with_args("arg", "arg2")))
> patched_function()test/test_mock.py:1300:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/usr/lib64/python3.8/unittest/mock.py:1325: in patched return func(*newargs, **newkeywargs)test/test_mock.py:1294: in patched_function run_coroutine(Test().a_coroutine_with_args("arg"))E AssertionError: "arg2" does not match "An asyncio.Future, a coroutine or an awaitable is required"______________________________________________________________ Test_patch_autospec.test_patch_object_autospec ______________________________________________________________self = <test.test_mock.Test_patch_autospec testMethod=test_patch_object_autospec> def test_patch_object_autospec(self): called = False @asynctest.mock.patch.object(Test, "a_coroutine_with_args", autospec=True) def patched_function(patched): nonlocal called called = True self.assertTrue(asyncio.iscoroutinefunction(Test.a_coroutine_with_args)) with self.assertRaisesRegex(TypeError, "arg2"): run_coroutine(Test().a_coroutine_with_args("arg")) self.assertTrue(run_coroutine(Test().a_coroutine_with_args("arg", "arg2")))
> patched_function()test/test_mock.py:1279:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/usr/lib64/python3.8/unittest/mock.py:1325: in patched return func(*newargs, **newkeywargs)test/test_mock.py:1273: in patched_function self.assertTrue(asyncio.iscoroutinefunction(Test.a_coroutine_with_args))E AssertionError: False is not true_____________________________________ Test_patch_dict_decorator_coroutine_or_generator_scope.test_patch_coroutine_with_multiple_scopes _____________________________________self = <test.test_mock.Test_patch_dict_decorator_coroutine_or_generator_scope testMethod=test_patch_coroutine_with_multiple_scopes> def test_patch_coroutine_with_multiple_scopes(self): def tester(): return (self.is_patched(), self.second_dict_is_patched()) @asyncio.coroutine def tester_coroutine(future): before = tester() yield from future after = tester() return before, after def run_test(a_coroutine): loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: future = asyncio.Future(loop=loop) task = loop.create_task(a_coroutine(future)) loop.call_soon(lambda: future.set_result(tester())) before, after = loop.run_until_complete(task) finally: loop.close() return before, future.result(), after with self.subTest("old style coroutine - Outer: GLOBAL, inner: LIMITED"): @patch_dict_is_patched(scope=asynctest.GLOBAL) @patch_dict_second_dict_is_patched(scope=asynctest.LIMITED) @asyncio.coroutine def a_coroutine(future): return (yield from tester_coroutine(future)) before, between, after = run_test(a_coroutine)
> self.assertEqual((True, True), before)E AssertionError: Tuples differ: (True, True) != (<MagicMock name='Test().a_dict.__getitem_[98 chars]04'>)EE First differing element 0:E TrueE <MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'>EE - (True, True)E + (<MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'>,E + <MagicMock name='Test().a_second_dict.__getitem__()' id='140467041939904'>)test/test_mock.py:1518: AssertionError_____________________________________ Test_patch_dict_decorator_coroutine_or_generator_scope.test_patch_generator_with_multiple_scopes _____________________________________self = <test.test_mock.Test_patch_dict_decorator_coroutine_or_generator_scope testMethod=test_patch_generator_with_multiple_scopes> def test_patch_generator_with_multiple_scopes(self): with self.subTest("Outer: GLOBAL, inner: LIMITED"): @patch_dict_is_patched(scope=asynctest.GLOBAL) @patch_dict_second_dict_is_patched(scope=asynctest.LIMITED) def a_generator(): yield (self.is_patched(), self.second_dict_is_patched()) yield (self.is_patched(), self.second_dict_is_patched()) gen = a_generator() try:
> self.assertEqual((True, True), next(gen))E AssertionError: Tuples differ: (True, True) != (<MagicMock name='Test().a_dict.__getitem_[98 chars]04'>)EE First differing element 0:E TrueE <MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'>EE - (True, True)E + (<MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'>,E + <MagicMock name='Test().a_second_dict.__getitem__()' id='140467041939904'>)test/test_mock.py:1418: AssertionError______________________________ Test_patch_dict_decorator_coroutine_or_generator_scope.test_patch_generator_with_multiple_scopes_on_same_dict _______________________________self = <test.test_mock.Test_patch_dict_decorator_coroutine_or_generator_scope testMethod=test_patch_generator_with_multiple_scopes_on_same_dict> def test_patch_generator_with_multiple_scopes_on_same_dict(self): import test.test_mock def tester(): test.test_mock.Test.a_dict['overriden_value'] = True for _ in range(2): yield ( self.is_patched(), self.second_is_patched(), test.test_mock.Test.a_dict.get('overriden_value', False)) with self.subTest("Outer: GLOBAL, inner: LIMITED"): @patch_dict_is_patched(scope=asynctest.GLOBAL) @patch_dict_second_is_patched(scope=asynctest.LIMITED) def a_generator(): yield from tester() gen = a_generator() try:
> self.assertEqual((True, True, True), next(gen))E AssertionError: Tuples differ: (True, True, True) != (<MagicMock name='Test().a_dict.__getitem_[150 chars]08'>)EE First differing element 0:E TrueE <MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'>EE - (True, True, True)E + (<MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'>,E + <MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'>,E + <MagicMock name='Test.a_dict.get()' id='140467041323808'>)test/test_mock.py:1461: AssertionError________________________________________________ Test_patch_dict_decorator_coroutine_or_generator_scope.test_scope_limited _________________________________________________self = <test.test_mock.Test_patch_dict_decorator_coroutine_or_generator_scope testMethod=test_scope_limited> def test_scope_limited(self): @patch_dict_is_patched(scope=asynctest.LIMITED) def a_generator(): yield self.is_patched() yield self.is_patched() gen = a_generator() self.addCleanup(gen.close) self.assertTrue(next(gen))
> self.assertFalse(self.is_patched())E AssertionError: <MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'> is not falsetest/test_mock.py:1405: AssertionError_____________________________________________ Test_patch_and_patch_dict_scope.test_both_patch_and_patch_dict_with_scope_global _____________________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc108f43580> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)E StopIteration: (True, <MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'>)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041: StopIterationDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_and_patch_dict_scope testMethod=test_both_patch_and_patch_dict_with_scope_global> def test_both_patch_and_patch_dict_with_scope_global(self): def test_result(): import test.test_mock instance = test.test_mock.Test() return (instance.is_patched(), instance.a_dict['is_patched']) with self.subTest("patch and patch.dict"): @patch_dict_is_patched(scope=asynctest.GLOBAL) @patch_is_patched(scope=asynctest.GLOBAL) @asyncio.coroutine def a_coroutine(): return test_result()
> self.assertEqual((True, True), run_coroutine(a_coroutine()))test/test_mock.py:1577:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc108220850> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError____________________________________________ Test_patch_and_patch_dict_scope.test_both_patch_and_patch_dict_with_scope_limited _____________________________________________self = <test.test_mock.Test_patch_and_patch_dict_scope testMethod=test_both_patch_and_patch_dict_with_scope_limited> def test_both_patch_and_patch_dict_with_scope_limited(self): import test.test_mock instance = test.test_mock.Test() def test_result(instance): yield (instance.is_patched(), instance.a_dict['is_patched']) yield (instance.is_patched(), instance.a_dict['is_patched']) with self.subTest("patch and patch.dict"): @patch_dict_is_patched(scope=asynctest.LIMITED) @patch_is_patched(scope=asynctest.LIMITED) def a_generator(instance): yield from test_result(instance) gen = a_generator(instance)
> self.assertEqual((True, True), next(gen))test/test_mock.py:1603:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:985: in patched_factory patching.__exit__(*exc_info)/usr/lib64/python3.8/unittest/mock.py:1524: in __exit__ return exit_stack.__exit__(*exc_info)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <contextlib.ExitStack object at 0x7fc1082eceb0>, exc_details = () def __exit__(self, *exc_details):
> received_exc = exc_details[0] is not NoneE IndexError: tuple index out of range/usr/lib64/python3.8/contextlib.py:483: IndexError______________________________________________ Test_patch_decorator_coroutine_or_generator_scope.test_default_scope_is_global ______________________________________________../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1060: in close self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc108220be0> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError_______________________________________ Test_patch_decorator_coroutine_or_generator_scope.test_patch_coroutine_with_multiple_scopes ________________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope testMethod=test_patch_coroutine_with_multiple_scopes> def test_patch_coroutine_with_multiple_scopes(self): def set_fut_result(fut): fut.set_result((self.is_patched(), self.second_is_patched())) @asyncio.coroutine def tester(coro_function): loop = asyncio.get_event_loop() fut = asyncio.Future(loop=loop) loop.call_soon(set_fut_result, fut) before, after = yield from coro_function(fut) self.assertEqual((True, True), before) self.assertEqual((True, False), fut.result()) self.assertEqual((True, True), after) self.assertFalse(self.is_patched()) self.assertFalse(self.second_is_patched()) with self.subTest("old style coroutine - Outer: GLOBAL, inner: LIMITED"): @patch_is_patched(scope=asynctest.GLOBAL) @patch_second_is_patched(scope=asynctest.LIMITED) def a_coroutine(fut): before = (self.is_patched(), self.second_is_patched()) yield from fut after = (self.is_patched(), self.second_is_patched()) return before, after
> run_coroutine(tester(a_coroutine))test/test_mock.py:1697:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()test/test_mock.py:1681: in tester before, after = yield from coro_function(fut)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:985: in patched_factory patching.__exit__(*exc_info)/usr/lib64/python3.8/unittest/mock.py:1524: in __exit__ return exit_stack.__exit__(*exc_info)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <contextlib.ExitStack object at 0x7fc108220790>, exc_details = () def __exit__(self, *exc_details):
> received_exc = exc_details[0] is not NoneE IndexError: tuple index out of range/usr/lib64/python3.8/contextlib.py:483: IndexError_______________________________________ Test_patch_decorator_coroutine_or_generator_scope.test_patch_generator_with_multiple_scopes ________________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope testMethod=test_patch_generator_with_multiple_scopes> def test_patch_generator_with_multiple_scopes(self): def a_generator(): yield (self.is_patched(), self.second_is_patched()) yield (self.is_patched(), self.second_is_patched()) with self.subTest("Outer: GLOBAL, inner: LIMITED"): @patch_is_patched(scope=asynctest.GLOBAL) @patch_second_is_patched(scope=asynctest.LIMITED) def patched(): yield from a_generator() gen = patched() try:
> self.assertEqual((True, True), next(gen))test/test_mock.py:1650:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:985: in patched_factory patching.__exit__(*exc_info)/usr/lib64/python3.8/unittest/mock.py:1524: in __exit__ return exit_stack.__exit__(*exc_info)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <contextlib.ExitStack object at 0x7fc103bf3dc0>, exc_details = () def __exit__(self, *exc_details):
> received_exc = exc_details[0] is not NoneE IndexError: tuple index out of range/usr/lib64/python3.8/contextlib.py:483: IndexError_________________________________ Test_patch_decorator_coroutine_or_generator_scope_GLOBAL.test_deactivate_patch_when_generator_exec_fails _________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc103ae6a60> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _args = (), kw = {} @functools.wraps(func) def coro(*args, **kw):
> res = func(*args, **kw)E TypeError: a_coroutine() missing 1 required positional argument: 'missing_arg'/usr/lib64/python3.8/asyncio/coroutines.py:124: TypeErrorDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_GLOBAL testMethod=test_deactivate_patch_when_generator_exec_fails> def test_deactivate_patch_when_generator_exec_fails(self):
> self._test_deactivate_patch_when_generator_exec_fails(asynctest.GLOBAL)test/test_mock.py:1739:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/test_mock.py:1348: in _test_deactivate_patch_when_generator_exec_fails run_coroutine(tester())test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()test/test_mock.py:1341: in tester yield from a_coroutine()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc103ae6640> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError_________________________________ Test_patch_decorator_coroutine_or_generator_scope_GLOBAL.test_deactivate_patch_when_generator_init_fails _________________________________args = (), kwargs = {}, extra_args = [], patchers_to_exit = [], patch_dict_with_limited_scope = [], exc_info = ()patching = <asynctest.mock._patch object at 0x7fc1080e2550>, arg = <function <lambda> at 0x7fc108e2e700> def patched_factory(*args, **kwargs): extra_args = [] patchers_to_exit = [] patch_dict_with_limited_scope = [] exc_info = tuple() try: for patching in patchings: arg = patching.__enter__() if patching.scope == LIMITED: patchers_to_exit.append(patching) if isinstance(patching, _patch_dict): if patching.scope == GLOBAL: for limited_patching in patch_dict_with_limited_scope: if limited_patching.in_dict is patching.in_dict: limited_patching._keep_global_patch(patching) else: patch_dict_with_limited_scope.append(patching) else: if patching.attribute_name is not None: kwargs.update(arg) if patching.new is DEFAULT: patching.new = arg[patching.attribute_name] elif patching.new is DEFAULT: patching.mock_to_reuse = arg extra_args.append(arg) args += tuple(extra_args)
> gen = func(*args, **kwargs)E TypeError: a_generator() missing 1 required positional argument: 'wrong_number_of_args'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:971: TypeErrorDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_GLOBAL testMethod=test_deactivate_patch_when_generator_init_fails> def test_deactivate_patch_when_generator_init_fails(self):
> self._test_deactivate_patch_when_generator_init_fails(asynctest.GLOBAL)test/test_mock.py:1736:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/test_mock.py:1324: in _test_deactivate_patch_when_generator_init_fails next(gen)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:975: in patched_factory if patching not in patchers_to_exit and _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc1080e2550> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError_______________________________________ Test_patch_decorator_coroutine_or_generator_scope_GLOBAL.test_multiple_patches_on_coroutine ________________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc108c4aaf0> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)E StopIteration: ((True, <MagicMock name='Test().second_is_patched()' id='140467040214080'>), (True, <MagicMock name='Test().second_is_patched()' id='140467040214080'>))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041: StopIterationDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_GLOBAL testMethod=test_multiple_patches_on_coroutine> def test_multiple_patches_on_coroutine(self): def set_fut_result(fut): fut.set_result((self.is_patched(), self.second_is_patched())) @asyncio.coroutine def tester(coro_function): loop = asyncio.get_event_loop() fut = asyncio.Future(loop=loop) loop.call_soon(set_fut_result, fut) before, after = yield from coro_function(fut) self.assertEqual((True, True), before) self.assertEqual((True, True), fut.result()) self.assertEqual((True, True), after) self.assertFalse(self.is_patched()) self.assertFalse(self.second_is_patched()) with self.subTest("old style coroutine"): @patch_second_is_patched(scope=asynctest.GLOBAL) @patch_is_patched(scope=asynctest.GLOBAL) def a_coroutine(fut): before = (self.is_patched(), self.second_is_patched()) yield from fut after = (self.is_patched(), self.second_is_patched()) return before, after
> run_coroutine(tester(a_coroutine))test/test_mock.py:1890:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()test/test_mock.py:1874: in tester before, after = yield from coro_function(fut)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc108c4a6d0> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError_______________________________________ Test_patch_decorator_coroutine_or_generator_scope_GLOBAL.test_multiple_patches_on_generator ________________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc1083b5340> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)E StopIteration../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041: StopIterationDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_GLOBAL testMethod=test_multiple_patches_on_generator> def test_multiple_patches_on_generator(self): @patch_second_is_patched(scope=asynctest.GLOBAL) @patch_is_patched(scope=asynctest.GLOBAL) def a_generator(): yield self.is_patched() and self.second_is_patched() yield self.is_patched() and self.second_is_patched() gen = a_generator() self.assertTrue(next(gen)) self.assertTrue(self.is_patched()) self.assertTrue(self.second_is_patched()) self.assertTrue(next(gen)) # exhaust the generator try:
> next(gen)test/test_mock.py:1858:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc1083b5cd0> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError____________________________________ Test_patch_decorator_coroutine_or_generator_scope_GLOBAL.test_patch_coroutine_during_its_lifetime _____________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc108211f40> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)E StopIteration: (True, True)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041: StopIterationDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_GLOBAL testMethod=test_patch_coroutine_during_its_lifetime> def test_patch_coroutine_during_its_lifetime(self): def set_fut_result(fut): fut.set_result(self.is_patched()) @asyncio.coroutine def tester(coro_function): loop = asyncio.get_event_loop() fut = asyncio.Future(loop=loop) loop.call_soon(set_fut_result, fut) before, after = yield from coro_function(fut) self.assertTrue(before) self.assertTrue(fut.result()) self.assertTrue(after) self.assertFalse(self.is_patched()) with self.subTest("old style coroutine"): @patch_is_patched(scope=asynctest.GLOBAL) def a_coroutine(fut): before = self.is_patched() yield from fut after = self.is_patched() return before, after
> run_coroutine(tester(a_coroutine))test/test_mock.py:1806:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()test/test_mock.py:1792: in tester before, after = yield from coro_function(fut)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc1082118e0> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError______________________________________ Test_patch_decorator_coroutine_or_generator_scope_GLOBAL.test_patch_generator_during_its_close ______________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_GLOBAL testMethod=test_patch_generator_during_its_close> def test_patch_generator_during_its_close(self): when_generator_closes = (False, False) @patch_second_is_patched(scope=asynctest.LIMITED) @patch_is_patched(scope=asynctest.GLOBAL) def a_generator(): try: while True: yield (self.is_patched(), self.second_is_patched()) except GeneratorExit: nonlocal when_generator_closes when_generator_closes = (self.is_patched(), self.second_is_patched()) raise gen = a_generator()
> self.assertEqual((True, True), next(gen))test/test_mock.py:1775:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:985: in patched_factory patching.__exit__(*exc_info)/usr/lib64/python3.8/unittest/mock.py:1524: in __exit__ return exit_stack.__exit__(*exc_info)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <contextlib.ExitStack object at 0x7fc103b91670>, exc_details = () def __exit__(self, *exc_details):
> received_exc = exc_details[0] is not NoneE IndexError: tuple index out of range/usr/lib64/python3.8/contextlib.py:483: IndexError____________________________________ Test_patch_decorator_coroutine_or_generator_scope_GLOBAL.test_patch_generator_during_its_lifetime _____________________________________self = <[AttributeError("'_PatchedGenerator' object has no attribute 'generator'") raised in repr()] _PatchedGenerator object at 0x7fc103d3c190> def __next__(self): try: with self._limited_patchings_stack():
> return self.gen.send(None)E StopIteration../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1041: StopIterationDuring handling of the above exception, another exception occurred:self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_GLOBAL testMethod=test_patch_generator_during_its_lifetime> def test_patch_generator_during_its_lifetime(self): @patch_is_patched(scope=asynctest.GLOBAL) def a_generator(): yield self.is_patched() yield self.is_patched() gen = a_generator() self.assertTrue(next(gen)) self.assertTrue(self.is_patched()) self.assertTrue(next(gen)) # exhaust the generator try:
> next(gen)test/test_mock.py:1753:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1044: in __next__ self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc103d3c040> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError___________________________________ Test_patch_decorator_coroutine_or_generator_scope_GLOBAL.test_patch_stopped_when_generator_is_closed ___________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_GLOBAL testMethod=test_patch_stopped_when_generator_is_closed> def test_patch_stopped_when_generator_is_closed(self): @patch_is_patched(scope=asynctest.GLOBAL) def a_generator(): yield self.is_patched() gen = a_generator() self.assertTrue(next(gen)) self.assertTrue(self.is_patched())
> gen.close()test/test_mock.py:1841:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1060: in close self._stop_global_patchings()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1032: in _stop_global_patchings if _is_started(patching):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _patching = <asynctest.mock._patch object at 0x7fc103da1520> def _is_started(patching): if isinstance(patching, _patch_dict): return patching._is_started else:
> return unittest.mock._is_started(patching)E AttributeError: module 'unittest.mock' has no attribute '_is_started'../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:124: AttributeError_________________________________ Test_patch_decorator_coroutine_or_generator_scope_GLOBAL.test_patch_stopped_when_generator_is_collected __________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_GLOBAL testMethod=test_patch_stopped_when_generator_is_collected> @unittest.skipIf(platform.python_implementation() != "CPython", "Test relying on how __del__ is called by implementation") def test_patch_stopped_when_generator_is_collected(self): @patch_is_patched(scope=asynctest.GLOBAL) def a_generator(): yield self.is_patched() gen = a_generator() self.assertTrue(next(gen)) self.assertTrue(self.is_patched()) del gen
> self.assertFalse(self.is_patched())E AssertionError: True is not falsetest/test_mock.py:1831: AssertionError________________________________ Test_patch_decorator_coroutine_or_generator_scope_LIMITED.test_deactivate_patch_when_generator_exec_fails _________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_LIMITED testMethod=test_deactivate_patch_when_generator_exec_fails> def test_deactivate_patch_when_generator_exec_fails(self):
> self._test_deactivate_patch_when_generator_exec_fails(asynctest.LIMITED)test/test_mock.py:1910:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/test_mock.py:1348: in _test_deactivate_patch_when_generator_exec_fails run_coroutine(tester())test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()test/test_mock.py:1341: in tester yield from a_coroutine()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:985: in patched_factory patching.__exit__(*exc_info)/usr/lib64/python3.8/unittest/mock.py:1524: in __exit__ return exit_stack.__exit__(*exc_info)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <contextlib.ExitStack object at 0x7fc103fd3dc0>, exc_details = () def __exit__(self, *exc_details):
> received_exc = exc_details[0] is not NoneE IndexError: tuple index out of range/usr/lib64/python3.8/contextlib.py:483: IndexError________________________________ Test_patch_decorator_coroutine_or_generator_scope_LIMITED.test_deactivate_patch_when_generator_init_fails _________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_LIMITED testMethod=test_deactivate_patch_when_generator_init_fails> def test_deactivate_patch_when_generator_init_fails(self):
> self._test_deactivate_patch_when_generator_init_fails(asynctest.LIMITED)test/test_mock.py:1907:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/test_mock.py:1329: in _test_deactivate_patch_when_generator_init_fails self.assertFalse(self.is_patched())E AssertionError: True is not false_______________________________________ Test_patch_decorator_coroutine_or_generator_scope_LIMITED.test_multiple_patches_on_coroutine _______________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_LIMITED testMethod=test_multiple_patches_on_coroutine> def test_multiple_patches_on_coroutine(self): def set_fut_result(fut): fut.set_result((self.is_patched(), self.second_is_patched())) @asyncio.coroutine def tester(coro_function): loop = asyncio.get_event_loop() fut = asyncio.Future(loop=loop) loop.call_soon(set_fut_result, fut) before, after = yield from coro_function(fut) self.assertEqual((True, True), before) self.assertEqual((False, False), fut.result()) self.assertEqual((True, True), after) self.assertFalse(self.is_patched()) self.assertFalse(self.second_is_patched()) with self.subTest("old style coroutine"): @patch_second_is_patched(scope=asynctest.LIMITED) @patch_is_patched(scope=asynctest.LIMITED) def a_coroutine(fut): before = (self.is_patched(), self.second_is_patched()) yield from fut after = (self.is_patched(), self.second_is_patched()) return before, after
> run_coroutine(tester(a_coroutine))test/test_mock.py:1996:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()test/test_mock.py:1980: in tester before, after = yield from coro_function(fut)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:985: in patched_factory patching.__exit__(*exc_info)/usr/lib64/python3.8/unittest/mock.py:1524: in __exit__ return exit_stack.__exit__(*exc_info)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <contextlib.ExitStack object at 0x7fc103dc8310>, exc_details = () def __exit__(self, *exc_details):
> received_exc = exc_details[0] is not NoneE IndexError: tuple index out of range/usr/lib64/python3.8/contextlib.py:483: IndexError_____________________________________ Test_patch_decorator_coroutine_or_generator_scope_LIMITED.test_patch_coroutine_only_when_running _____________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_LIMITED testMethod=test_patch_coroutine_only_when_running> def test_patch_coroutine_only_when_running(self): def set_fut_result(fut): fut.set_result(self.is_patched()) @asyncio.coroutine def tester(coro_function): loop = asyncio.get_event_loop() fut = asyncio.Future(loop=loop) loop.call_soon(set_fut_result, fut) before, after = yield from coro_function(fut) self.assertTrue(before) self.assertFalse(fut.result()) self.assertTrue(after) with self.subTest("old style coroutine"): @patch_is_patched(scope=asynctest.LIMITED) def a_coroutine(fut): before = self.is_patched() yield from fut after = self.is_patched() return before, after
> run_coroutine(tester(a_coroutine))test/test_mock.py:1945:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()test/test_mock.py:1932: in tester before, after = yield from coro_function(fut)../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:985: in patched_factory patching.__exit__(*exc_info)/usr/lib64/python3.8/unittest/mock.py:1524: in __exit__ return exit_stack.__exit__(*exc_info)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <contextlib.ExitStack object at 0x7fc103ca4ac0>, exc_details = () def __exit__(self, *exc_details):
> received_exc = exc_details[0] is not NoneE IndexError: tuple index out of range/usr/lib64/python3.8/contextlib.py:483: IndexError_____________________________________ Test_patch_decorator_coroutine_or_generator_scope_LIMITED.test_patch_generator_only_when_running _____________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_LIMITED testMethod=test_patch_generator_only_when_running> def test_patch_generator_only_when_running(self): @patch_is_patched(scope=asynctest.LIMITED) def a_generator(): yield self.is_patched() yield self.is_patched() gen = a_generator()
> self.assertTrue(next(gen))test/test_mock.py:1919:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:985: in patched_factory patching.__exit__(*exc_info)/usr/lib64/python3.8/unittest/mock.py:1524: in __exit__ return exit_stack.__exit__(*exc_info)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <contextlib.ExitStack object at 0x7fc103b72670>, exc_details = () def __exit__(self, *exc_details):
> received_exc = exc_details[0] is not NoneE IndexError: tuple index out of range/usr/lib64/python3.8/contextlib.py:483: IndexError_____________________________________ Test_patch_decorator_coroutine_or_generator_scope_LIMITED.test_patched_coroutine_with_mock_args ______________________________________self = <test.test_mock.Test_patch_decorator_coroutine_or_generator_scope_LIMITED testMethod=test_patched_coroutine_with_mock_args> def test_patched_coroutine_with_mock_args(self): @asynctest.mock.patch('test.test_mock.Test', side_effect=lambda: None, scope=asynctest.LIMITED) @asyncio.coroutine def a_coroutine(mock): loop = asyncio.get_event_loop() self.assertIs(mock, Test) yield from asyncio.sleep(0, loop=loop) self.assertIs(mock, Test) yield from asyncio.sleep(0, loop=loop) self.assertIs(mock, Test)
> run_coroutine(a_coroutine())test/test_mock.py:1969:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result()../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:995: in patched_generator return (yield from patched_factory(*args, **kwargs))../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:985: in patched_factory patching.__exit__(*exc_info)/usr/lib64/python3.8/unittest/mock.py:1524: in __exit__ return exit_stack.__exit__(*exc_info)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <contextlib.ExitStack object at 0x7fc103aa4160>, exc_details = () def __exit__(self, *exc_details):
> received_exc = exc_details[0] is not NoneE IndexError: tuple index out of range/usr/lib64/python3.8/contextlib.py:483: IndexError_________________________________________________ Test_create_autospec.test_autospec_attributes_being_coroutine_functions __________________________________________________self = <test.test_mock.Test_create_autospec testMethod=test_autospec_attributes_being_coroutine_functions> def test_autospec_attributes_being_coroutine_functions(self): mock = asynctest.mock.create_autospec(Test) self.assertFalse(asyncio.iscoroutinefunction(mock)) self.assertFalse(asyncio.iscoroutinefunction(mock.a_function))
> self.assertTrue(asyncio.iscoroutinefunction(mock.a_coroutine))E AssertionError: False is not truetest/test_mock.py:2136: AssertionError______________________________________________ Test_create_autospec.test_autospec_of_coroutine_function_is_coroutinefunction _______________________________________________self = <test.test_mock.Test_create_autospec testMethod=test_autospec_of_coroutine_function_is_coroutinefunction> def test_autospec_of_coroutine_function_is_coroutinefunction(self): mock = asynctest.mock.create_autospec(Test.a_function) self.assertFalse(asyncio.iscoroutinefunction(mock)) mock = asynctest.mock.create_autospec(Test.a_coroutine)
> self.assertTrue(asyncio.iscoroutinefunction(mock))E AssertionError: False is not truetest/test_mock.py:2115: AssertionError_________________________________________ Test_create_autospec.test_create_autospec_on_coroutine_with_instance_raises_RuntimeError _________________________________________self = <test.test_mock.Test_create_autospec testMethod=test_create_autospec_on_coroutine_with_instance_raises_RuntimeError> def test_create_autospec_on_coroutine_with_instance_raises_RuntimeError(self): with self.assertRaises(RuntimeError):
> asynctest.mock.create_autospec(Test.a_coroutine, instance=True)E AssertionError: RuntimeError not raisedtest/test_mock.py:2180: AssertionError_____________________________________________ Test_create_autospec.test_create_autospec_on_coroutine_with_iterable_side_effect _____________________________________________self = <test.test_mock.Test_create_autospec testMethod=test_create_autospec_on_coroutine_with_iterable_side_effect> def test_create_autospec_on_coroutine_with_iterable_side_effect(self): coroutines = [Test.a_coroutine, Test.an_async_coroutine] for a_coroutine in coroutines: mock = asynctest.mock.create_autospec( a_coroutine, side_effect=("PROBE1", "PROBE2"))
> self.assertEqual("PROBE1", run_coroutine(mock(None)))test/test_mock.py:2158:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:595: in run_until_complete future = tasks.ensure_future(future, loop=self)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _coro_or_future = 'PROBE1' def ensure_future(coro_or_future, *, loop=None): """Wrap a coroutine or an awaitable in a future. If the argument is a Future, it is returned directly. """ if coroutines.iscoroutine(coro_or_future): if loop is None: loop = events.get_event_loop() task = loop.create_task(coro_or_future) if task._source_traceback: del task._source_traceback[-1] return task elif futures.isfuture(coro_or_future): if loop is not None and loop is not futures._get_loop(coro_or_future): raise ValueError('The future belongs to a different loop than ' 'the one specified as the loop argument') return coro_or_future elif inspect.isawaitable(coro_or_future): return ensure_future(_wrap_awaitable(coro_or_future), loop=loop) else:
> raise TypeError('An asyncio.Future, a coroutine or an awaitable is ' 'required')E TypeError: An asyncio.Future, a coroutine or an awaitable is required/usr/lib64/python3.8/asyncio/tasks.py:684: TypeError_________________________________________________ Test_create_autospec.test_create_autospec_on_coroutine_with_return_value _________________________________________________self = <test.test_mock.Test_create_autospec testMethod=test_create_autospec_on_coroutine_with_return_value> def test_create_autospec_on_coroutine_with_return_value(self): mock = asynctest.mock.create_autospec(Test.a_coroutine, return_value="PROBE")
> self.assertEqual("PROBE", run_coroutine(mock(None)))test/test_mock.py:2146:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _test/utils.py:9: in run_coroutine return loop.run_until_complete(coroutine)/usr/lib64/python3.8/asyncio/base_events.py:595: in run_until_complete future = tasks.ensure_future(future, loop=self)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _coro_or_future = 'PROBE' def ensure_future(coro_or_future, *, loop=None): """Wrap a coroutine or an awaitable in a future. If the argument is a Future, it is returned directly. """ if coroutines.iscoroutine(coro_or_future): if loop is None: loop = events.get_event_loop() task = loop.create_task(coro_or_future) if task._source_traceback: del task._source_traceback[-1] return task elif futures.isfuture(coro_or_future): if loop is not None and loop is not futures._get_loop(coro_or_future): raise ValueError('The future belongs to a different loop than ' 'the one specified as the loop argument') return coro_or_future elif inspect.isawaitable(coro_or_future): return ensure_future(_wrap_awaitable(coro_or_future), loop=loop) else:
> raise TypeError('An asyncio.Future, a coroutine or an awaitable is ' 'required')E TypeError: An asyncio.Future, a coroutine or an awaitable is required/usr/lib64/python3.8/asyncio/tasks.py:684: TypeError______________________________________________ Test_create_autospec.test_generator_and_coroutine_is_instance_of_FunctionType _______________________________________________self = <test.test_mock.Test_create_autospec testMethod=test_generator_and_coroutine_is_instance_of_FunctionType> def test_generator_and_coroutine_is_instance_of_FunctionType(self): # this test is somewhat a forward compatibility test: if ever # unittest.mock.FunctionTypes doesn't detect generators and coroutines # as instance of these types, we need to fix it in asynctest. def gen(): yield from range(10) self.assertIsInstance(gen, unittest.mock.FunctionTypes)
> self.assertIsInstance(Test.a_coroutine, unittest.mock.FunctionTypes)E AssertionError: <MagicMock name='Test.a_coroutine' id='140467055305008'> is not an instance of (<class 'function'>, <class 'method'>)test/test_mock.py:2069: AssertionError__________________________________________________ Test_create_autospec.test_mock_add_spec_on_mock_created_with_autospec ___________________________________________________self = <test.test_mock.Test_create_autospec testMethod=test_mock_add_spec_on_mock_created_with_autospec> def test_mock_add_spec_on_mock_created_with_autospec(self): # See bug #107 mock = asynctest.mock.create_autospec(Test()) self.assertFalse(hasattr(mock, "added_attribute")) mock.mock_add_spec(["added_attribute"])
> self.assertIsInstance(mock.added_attribute, asynctest.Mock)test/test_mock.py:2188:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <MagicMock spec='MagicMock' id='140466968312656'>, name = 'added_attribute' def __getattr__(self, name): if name in {'_mock_methods', '_mock_unsafe'}: raise AttributeError(name) elif self._mock_methods is not None: if name not in self._mock_methods or name in _all_magics:
> raise AttributeError("Mock object has no attribute %r" % name)E AttributeError: Mock object has no attribute 'added_attribute'/usr/lib64/python3.8/unittest/mock.py:637: AttributeError___________________________________________ Test_fail_on_active_selector_callbacks.test_events_watched_outside_test_are_ignored ____________________________________________self = <_UnixSelectorEventLoop running=False closed=True debug=False>, fd = <FileMock id='140466966690544'>callback = <function Test_fail_on_active_selector_callbacks.test_events_watched_outside_test_are_ignored.<locals>.<lambda> at 0x7fc1082311f0>, args = ()handle = <Handle Test_fail_on_active_selector_callbacks.test_events_watched_outside_test_are_ignored.<locals>.<lambda>() at /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_selector.py:295> def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try:
> key = self._selector.get_key(fd)/usr/lib64/python3.8/asyncio/selector_events.py:261:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <selectors.EpollSelector object at 0x7fc103b72af0>, fileobj = <FileMock id='140466966690544'> def get_key(self, fileobj): """Return the key associated to a registered file object. Returns: SelectorKey for this file object """ mapping = self.get_map() if mapping is None: raise RuntimeError('Selector is closed') try: return mapping[fileobj] except KeyError:
> raise KeyError("{!r} is not registered".format(fileobj)) from NoneE KeyError: "<FileMock id='140466966690544'> is not registered"/usr/lib64/python3.8/selectors.py:192: KeyErrorDuring handling of the above exception, another exception occurred:self = <test.test_selector.Test_fail_on_active_selector_callbacks testMethod=test_events_watched_outside_test_are_ignored> def test_events_watched_outside_test_are_ignored(self): loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: mock = asynctest.selector.FileMock()
> loop.add_reader(mock, lambda: None)test/test_selector.py:295:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/usr/lib64/python3.8/asyncio/selector_events.py:334: in add_reader return self._add_reader(fd, callback, *args)/usr/lib64/python3.8/asyncio/selector_events.py:263: in _add_reader self._selector.register(fd, selectors.EVENT_READ,_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <selectors.EpollSelector object at 0x7fc103b72af0>, fileobj = <FileMock id='140466966690544'>, events = 1data = (<Handle Test_fail_on_active_selector_callbacks.test_events_watched_outside_test_are_ignored.<locals>.<lambda>() at /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_selector.py:295>, None) def register(self, fileobj, events, data=None): key = super().register(fileobj, events, data) poller_events = 0 if events & EVENT_READ: poller_events |= self._EVENT_READ if events & EVENT_WRITE: poller_events |= self._EVENT_WRITE try:
> self._selector.register(key.fd, poller_events)E PermissionError: [Errno 1] Operation not permitted/usr/lib64/python3.8/selectors.py:359: PermissionError============================================================================= warnings summary =============================================================================../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:434 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:434: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def wait(self, skip=0):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:448 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:448: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def wait_next(self, skip=0):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:468 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:468: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def wait_for(self, predicate):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:489 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:489: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def _notify(self):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:357 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:357: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def doCleanups(self):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:381 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:381: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def assertAsyncRaises(self, exception, awaitable):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:392 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:392: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def assertAsyncRaisesRegex(self, exception, regex, awaitable):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:403 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:403: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def assertAsyncWarns(self, warning, awaitable):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:414 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:414: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def assertAsyncWarnsRegex(self, warning, regex, awaitable):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:445 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:445: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def advance(self, seconds):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:487 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/case.py:487: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def _drain_loop(self):../../BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/helpers.py:13 /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/helpers.py:13: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def exhaust_callbacks(loop):test/test_case.py:44 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:44: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def start_wait_process(loop):test/test_case.py:58 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:58: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def runTest(self):test/test_case.py:399 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:399: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def advance(self, seconds):test/test_case.py:412 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:412: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_advance(self):test/test_case.py:445 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:445: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_negative_advance(self):test/test_case.py:451 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:451: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_callbacks_are_called_on_time(self):test/test_case.py:477 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:477: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_setUp(self):test/test_case.py:484 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:484: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def setUp(self):test/test_case.py:494 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:494: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_setUp(self):test/test_case.py:876 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:876: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assertAsyncRaises(self):test/test_case.py:887 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:887: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assertAsyncRaisesRegex(self):test/test_case.py:905 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:905: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def warns(cls):test/test_case.py:916 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:916: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assertAsyncWarns(self):test/test_case.py:926 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:926: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assertAsyncWarnsRegex(self):test/test_helpers.py:11 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_helpers.py:11: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def wait_for(self, coro):test/test_mock.py:19 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:19: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_coroutine(self):test/test_mock.py:35 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:35: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_coroutine_with_args(self, arg, arg2):test/test_mock.py:40 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:40: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_classmethod_coroutine(cls):test/test_mock.py:45 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:45: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_staticmethod_coroutine():test/test_mock.py:522 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:522: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_awaited_CoroutineMock_sets_awaited(self):test/test_mock.py:540 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:540: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_awaited_CoroutineMock_counts(self):test/test_mock.py:569 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:569: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_awaited_from_autospec_mock(self):test/test_mock.py:580 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:580: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_awaited_wait(self):test/test_mock.py:595 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:595: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_awaited_wait_next(self):test/test_mock.py:614 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:614: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_await_args(self):test/test_mock.py:632 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:632: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_await_args_list(self):test/test_mock.py:650 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:650: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assert_awaited(self):test/test_mock.py:660 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:660: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assert_awaited_once(self):test/test_mock.py:674 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:674: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assert_awaited_with(self):test/test_mock.py:688 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:688: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assert_awaited_once_with(self):test/test_mock.py:702 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:702: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assert_any_wait(self):test/test_mock.py:719 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:719: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assert_has_awaits(self):test/test_mock.py:763 /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:763: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_assert_not_awaited(self):test/test_case.py::Test::StartWaitProcessTestCase::runTesttest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_watched_process_is_awaitedtest/test_case.py::Test_TestCase_and_ChildWatcher::test_watched_process_is_awaited /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:45: DeprecationWarning: The loop argument is deprecated since Python 3.8 and scheduled for removal in Python 3.10. process = yield from asyncio.create_subprocess_shell(test/test_case.py::Test::StartWaitProcessTestCase::runTesttest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_original_watcher_works_outside_looptest/test_case.py::Test_TestCase_and_ChildWatcher::test_watched_process_is_awaitedtest/test_case.py::Test_TestCase_and_ChildWatcher::test_watched_process_is_awaited /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:50: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. out, err = yield from asyncio.wait_for(test/test_case.py::Test_TestCase::test_cleanup_functions_can_be_coroutines /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:320: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def cleanup_coro():test/test_case.py::Test_TestCase::test_coroutine_returned_executed /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:236: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def set_ran(self):test/test_case.py::Test_TestCase::test_coroutinefunction_executed /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:213: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def runTest(self):test/test_case.py: 4 warningstest/test_mock.py: 97 warnings /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:599: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def proxy():test/test_case.py::Test_TestCase::test_setup_teardown_may_be_coroutines /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:283: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def setUp(self):test/test_case.py::Test_fail_on_unused_loop::test_fails_when_loop_ran_only_during_cleanuptest/test_case.py::Test_fail_on_unused_loop::test_fails_when_loop_ran_only_during_cleanuptest/test_case.py::Test_fail_on_unused_loop::test_fails_when_loop_ran_only_during_cleanuptest/test_case.py::Test_fail_on_unused_loop::test_fails_when_loop_ran_only_during_cleanup /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:848: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead self.addCleanup(asyncio.coroutine(lambda: None))test/test_case.py::Test_fail_on_unused_loop::test_passes_when_ignore_loop_or_loop_run /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_case.py:800: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def runTest(self):test/test_helpers.py::TestExhaust::test_exhaust_callbacks_cascading_callbackstest/test_helpers.py::TestExhaust::test_exhaust_callbacks_nothing_to_waittest/test_helpers.py::TestExhaust::test_exhaust_callbacks_one_callback /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_helpers.py:12: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. return (yield from asyncio.wait_for(coro, loop=self.loop, timeout=1))test/test_mock.py::Test_CoroutineMock::test_exception_side_effect_raises_in_coroutinetest/test_mock.py::Test_CoroutineMock_awaited::test_awaited_CoroutineMock_counts /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:594: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead result = asyncio.coroutine(_raise)(e)test/test_mock.py::Test_CoroutineMock::test_returns_coroutine_from_side_effect_being_a_coroutine /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:176: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead mock.side_effect = asyncio.coroutine(lambda: 'ProbeValue')test/test_mock.py::Test_CoroutineMock::test_returns_coroutine_with_return_value_being_a_coroutine /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:163: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead coroutine = asyncio.coroutine(lambda: 'ProbeValue')test/test_mock.py::Test_CoroutineMock_awaited::test_awaited_CoroutineMock_counts /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:550: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def side_effect():test/test_mock.py::Test_CoroutineMock_awaited::test_awaited_CoroutineMock_sets_awaited /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:531: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def side_effect():test/test_mock.py::Test_patch::test_patch_is_enabled_when_running_decorated_coroutine /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:971: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_coroutine():test/test_mock.py: 10 warnings /home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py:1001: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead patched = asyncio.coroutine(patched)test/test_mock.py::Test_patch_decorator_coroutine_or_generator::test_coroutine_arg_is_default_mock /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1043: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def tester(coroutine_function):test/test_mock.py::Test_patch_object::test_patch_decorates_coroutine /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1102: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_coroutine():test/test_mock.py::Test_patch_multiple::test_patch_decorates_coroutine /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1140: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_coroutine():test/test_mock.py::Test_patch_dict::test_patch_decorates_class /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1189: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def test_a_coroutine(self):test/test_mock.py::Test_patch_dict::test_patch_decorates_coroutine /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1161: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_coroutine():test/test_mock.py::Test_patch_dict_decorator_coroutine_or_generator_scope::test_patch_coroutine_with_multiple_scopes /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1490: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def tester_coroutine(future):test/test_mock.py::Test_patch_dict_decorator_coroutine_or_generator_scope::test_patch_coroutine_with_multiple_scopes /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1514: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_coroutine(future):test/test_mock.py::Test_patch_and_patch_dict_scope::test_both_patch_and_patch_dict_with_scope_global /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1574: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_coroutine():test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope::test_patch_coroutine_with_multiple_scopes /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1677: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def tester(coro_function):test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope::test_patch_coroutine_with_multiple_scopestest/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope::test_patch_generator_with_multiple_scopestest/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_patch_generator_during_its_close /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <function _PatchedGenerator.__del__ at 0x7fc1090939d0> Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1065, in __del__ self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching) AttributeError: module 'unittest.mock' has no attribute '_is_started' warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_deactivate_patch_when_generator_exec_failstest/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_deactivate_patch_when_generator_exec_fails /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1334: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_coroutine(missing_arg):test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_deactivate_patch_when_generator_exec_failstest/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_deactivate_patch_when_generator_exec_fails /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1339: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def tester():test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_multiple_patches_on_coroutine /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1870: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def tester(coro_function):test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_patch_coroutine_during_its_lifetime /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1788: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def tester(coro_function):test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_patch_stopped_when_generator_is_collected /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <generator object Test_patch_decorator_coroutine_or_generator_scope_GLOBAL.test_patch_stopped_when_generator_is_collected.<locals>.a_generator at 0x7fc103ffd190> Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 995, in patched_generator return (yield from patched_factory(*args, **kwargs)) File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1060, in close self._stop_global_patchings() File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 1032, in _stop_global_patchings if _is_started(patching): File "/home/tkloczko/rpmbuild/BUILDROOT/python-asynctest-0.13.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/asynctest/mock.py", line 124, in _is_started return unittest.mock._is_started(patching) AttributeError: module 'unittest.mock' has no attribute '_is_started' warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_multiple_patches_on_coroutine /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1976: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def tester(coro_function):test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_patch_coroutine_only_when_running /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1928: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def tester(coro_function):test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_patched_coroutine_with_mock_args /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:1961: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead def a_coroutine(mock):test/test_mock.py::Test_create_autospec::test_create_autospec_on_coroutine_with_coroutine_side_effecttest/test_mock.py::Test_create_autospec::test_create_autospec_on_coroutine_with_coroutine_side_effect /home/tkloczko/rpmbuild/BUILD/asynctest-0.13.0/test/test_mock.py:2175: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead a_coroutine, side_effect=asyncio.coroutine(lambda r: r))-- Docs: https://docs.pytest.org/en/stable/warnings.html========================================================================= short test summary info ==========================================================================FAILED doc/examples/tutorial/test_cases.py::AnExempleWhichDetectsPendingCallbacks::test_missing_a_callback - AssertionError: Loop contained unfinished work (<TimerHandle...FAILED test/test_case.py::Test::LoggingTestCase::test_basic - AttributeError: 'LoggingTestCase' object has no attribute 'runTest'FAILED test/test_mock.py::Test_CoroutineMock_awaited::test_awaited_from_autospec_mock - AssertionError: 1 != 2FAILED test/test_mock.py::Test_CoroutineMock_awaited::test_create_autospec_on_coroutine_and_using_assert_methods - AssertionError: Expected mock to have been awaited onc...FAILED test/test_mock.py::Test_patch::test_patch_is_enabled_when_running_decorated_coroutine - AttributeError: module 'unittest.mock' has no attribute '_is_started'FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator::test_coroutine_arg_is_default_mock - AttributeError: module 'unittest.mock' has no attribute '_is_...FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator::test_coroutine_type_when_patched - TypeError: An asyncio.Future, a coroutine or an awaitable is re...FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator::test_generator_arg_is_default_mock - AttributeError: module 'unittest.mock' has no attribute '_is_...FAILED test/test_mock.py::Test_patch_object::test_patch_coroutine_function_with_CoroutineMock - AssertionError: <MagicMock name='a_coroutine' id='140467054488448'> is no...FAILED test/test_mock.py::Test_patch_object::test_patch_decorates_coroutine - AttributeError: module 'unittest.mock' has no attribute '_is_started'FAILED test/test_mock.py::Test_patch_multiple::test_patch_coroutine_function_with_CoroutineMock - AssertionError: <MagicMock name='Test().a_coroutine' id='14046705372326...FAILED test/test_mock.py::Test_patch_multiple::test_patch_decorates_coroutine - AttributeError: module 'unittest.mock' has no attribute '_is_started'FAILED test/test_mock.py::Test_patch_dict::test_patch_decorates_class - AssertionError: <MagicMock name='Test().a_dict.__getitem__()' id='140467055200768'> is not falseFAILED test/test_mock.py::Test_patch_autospec::test_autospec_coroutine - AssertionError: <MagicMock name='Test.a_coroutine' spec='MagicMock' id='140467053499872'> is not...FAILED test/test_mock.py::Test_patch_autospec::test_patch_autospec_with_patches_on_top - AssertionError: False is not trueFAILED test/test_mock.py::Test_patch_autospec::test_patch_autospec_with_patches_under - AssertionError: False is not trueFAILED test/test_mock.py::Test_patch_autospec::test_patch_multiple_autospec - AssertionError: "arg2" does not match "An asyncio.Future, a coroutine or an awaitable is re...FAILED test/test_mock.py::Test_patch_autospec::test_patch_object_autospec - AssertionError: False is not trueFAILED test/test_mock.py::Test_patch_dict_decorator_coroutine_or_generator_scope::test_patch_coroutine_with_multiple_scopes - AssertionError: Tuples differ: (True, True)...FAILED test/test_mock.py::Test_patch_dict_decorator_coroutine_or_generator_scope::test_patch_generator_with_multiple_scopes - AssertionError: Tuples differ: (True, True)...FAILED test/test_mock.py::Test_patch_dict_decorator_coroutine_or_generator_scope::test_patch_generator_with_multiple_scopes_on_same_dict - AssertionError: Tuples differ:...FAILED test/test_mock.py::Test_patch_dict_decorator_coroutine_or_generator_scope::test_scope_limited - AssertionError: <MagicMock name='Test().a_dict.__getitem__()' id='...FAILED test/test_mock.py::Test_patch_and_patch_dict_scope::test_both_patch_and_patch_dict_with_scope_global - AttributeError: module 'unittest.mock' has no attribute '_i...FAILED test/test_mock.py::Test_patch_and_patch_dict_scope::test_both_patch_and_patch_dict_with_scope_limited - IndexError: tuple index out of rangeFAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope::test_default_scope_is_global - AttributeError: module 'unittest.mock' has no attribute '_is_...FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope::test_patch_coroutine_with_multiple_scopes - IndexError: tuple index out of rangeFAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope::test_patch_generator_with_multiple_scopes - IndexError: tuple index out of rangeFAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_deactivate_patch_when_generator_exec_fails - AttributeError: module 'unittest.mo...FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_deactivate_patch_when_generator_init_fails - AttributeError: module 'unittest.mo...FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_multiple_patches_on_coroutine - AttributeError: module 'unittest.mock' has no at...FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_multiple_patches_on_generator - AttributeError: module 'unittest.mock' has no at...FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_patch_coroutine_during_its_lifetime - AttributeError: module 'unittest.mock' has...FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_patch_generator_during_its_close - IndexError: tuple index out of rangeFAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_patch_generator_during_its_lifetime - AttributeError: module 'unittest.mock' has...FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_patch_stopped_when_generator_is_closed - AttributeError: module 'unittest.mock' ...FAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_GLOBAL::test_patch_stopped_when_generator_is_collected - AssertionError: True is not falseFAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_deactivate_patch_when_generator_exec_fails - IndexError: tuple index out of rangeFAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_deactivate_patch_when_generator_init_fails - AssertionError: True is not falseFAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_multiple_patches_on_coroutine - IndexError: tuple index out of rangeFAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_patch_coroutine_only_when_running - IndexError: tuple index out of rangeFAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_patch_generator_only_when_running - IndexError: tuple index out of rangeFAILED test/test_mock.py::Test_patch_decorator_coroutine_or_generator_scope_LIMITED::test_patched_coroutine_with_mock_args - IndexError: tuple index out of rangeFAILED test/test_mock.py::Test_create_autospec::test_autospec_attributes_being_coroutine_functions - AssertionError: False is not trueFAILED test/test_mock.py::Test_create_autospec::test_autospec_of_coroutine_function_is_coroutinefunction - AssertionError: False is not trueFAILED test/test_mock.py::Test_create_autospec::test_create_autospec_on_coroutine_with_instance_raises_RuntimeError - AssertionError: RuntimeError not raisedFAILED test/test_mock.py::Test_create_autospec::test_create_autospec_on_coroutine_with_iterable_side_effect - TypeError: An asyncio.Future, a coroutine or an awaitable i...FAILED test/test_mock.py::Test_create_autospec::test_create_autospec_on_coroutine_with_return_value - TypeError: An asyncio.Future, a coroutine or an awaitable is requiredFAILED test/test_mock.py::Test_create_autospec::test_generator_and_coroutine_is_instance_of_FunctionType - AssertionError: <MagicMock name='Test.a_coroutine' id='1404670...FAILED test/test_mock.py::Test_create_autospec::test_mock_add_spec_on_mock_created_with_autospec - AttributeError: Mock object has no attribute 'added_attribute'FAILED test/test_selector.py::Test_fail_on_active_selector_callbacks::test_events_watched_outside_test_are_ignored - PermissionError: [Errno 1] Operation not permitted=============================================================== 50 failed, 181 passed, 217 warnings in 9.26s ===============================================================
The text was updated successfully, but these errors were encountered:
I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes oly locally installed modulesHere is pytest output:
The text was updated successfully, but these errors were encountered: