diff options
author | Kristján Valur Jónsson <sweskman@gmail.com> | 2022-07-26 12:25:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 15:25:23 +0300 |
commit | 6f208212ed9114921840404591aecca9acd38f08 (patch) | |
tree | ab37049c4d6b5c04a11b32c85218d50bd8d54d52 /tox.ini | |
parent | 1df1d32bb6845d2ccbbc340199babe9fe0ef29d6 (diff) | |
download | redis-py-6f208212ed9114921840404591aecca9acd38f08.tar.gz |
Fix warnings and resource usage problems in asyncio unittests (#2258)
* Use pytest-asyncio in auto mode
Remove overly genereric `pytestmark=pytest.mark.asyncio` causing lots of warning noise
* Use "Factories as Fixtures" test pattern for the `create_redis` fixture
this fixture is now async, avoiding teardown problems with missing event loops.
* Fix sporadic error on fast event loops, such as `--uvloop`
* Close connection, even if "username" was in kwargs
This fixes a resource usage warning in the async unittests.
* Do async cleanup of acl passwords via a fixture
* Remove unused import, fix whitespace
* Fix test with missing "await"
* Close pubsub objects after use in unittest
Use a simple fixture where possible, otherwise manually call pubsub.close()
* re-introduce `pytestmark=pytest.mark.asyncio` for python 3.6
* Use context manager to clean up connections in connection pool for unit tests
* Provide asynccontextmanager for python 3.6
* make `test_late_subscribe()` more robuste
* Catch a couple of additional leaked resources
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -9,6 +9,7 @@ markers = asyncio: marker for async tests replica: replica tests experimental: run only experimental tests +asyncio_mode = auto [tox] minversion = 3.2.0 |