-
Type: Task
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
Context
Our existing test suite relies on a delicate, hacky mix of unittest and pytest. This adds significant code complexity and forces us to invent new workarounds due to unittest's poor async support. Refactoring our test infrastructure to more modern standards will reduce the time spent on test maintenance and infrastructure fixes considerably.
Definition of done
Unittest should be completely removed from our test infrastructure. Ideally we use pytest alone, but if needed additional dependencies could be included.
Pitfalls
We heavily utilize unittest classes throughout our test suite. As a result, untangling the tests from these classes will require careful refactoring of state management into scoped fixtures.
- is depended on by
-
PYTHON-5053 AsyncMongoClient.close() should await all background tasks
- Closed
-
PYTHON-4493 Use asyncio protocols instead of sockets for network IO
- Blocked
- is related to
-
PYTHON-5071 Async tests should all share a single event loop
- Closed
1.
|
Convert test_client.py to unittest | PYTHON-5055 | Backlog | Noah Stapp | ||
2.
|
Convert test.test_common to pytest | PYTHON-5066 | In Progress | Iris Ho | ||
3.
|
Convert test.test_cursor to pytest | PYTHON-5067 | In Progress | Iris Ho | ||
4.
|
Convert test.test_collation to pytest | PYTHON-5051 | In Progress | Iris Ho |