Open 0-wiz-0 opened 1 month ago
@0-wiz-0 thanks for reporting this. I'm unable to reproduce this error on my end when I do:
pip install -r testing/requirements.txt
pytest tests/transport/aio/test_aiohttp.py
I can see this error happening if you're using an older version of the mock
library. I'm unsure but would appreciate it if you can share more details about your environment so I can understand what's happening.
Given that AsyncMock
was introduced in unittest
in python versions >3.7, it may not be an ideal solution.
I'm also curious to know if you're encountering a similar error for running tests_async/transport/test_aiohttp_requests.py
which is another file where we're using AsyncMock
from mock
.
Hi @ohmay, thanks for looking at this. The problem was indeed that I had mock-3.0.5 installed. With mock-5.1.0 the patch is not needed.
That just leaves the test requirements - the sdist file on pypi does not include the testing
directory.
As for the requirements themselves, can you please check if all of them are really needed? For example, I see no difference in testing without asynctest installed, and asynctest seems to be unmaintained and not working on Python 3.11+: https://github.com/Martiusweb/asynctest/issues/163
I'm packaging for pkgsrc. When running the self tests, there are some problems.
Environment details
google-auth
version: 2.35.0Steps to reproduce
Run the self tests, see problems with missing dependencies. Most can be fixed by just adding them, but I need a patch for the asyncmock issue:
The full list of test dependencies seems to be (as of 2.35.0):