Skip to content

Migrate mock usage to unittest.mock - #562

Open
AleksMat wants to merge 1 commit into
google:mainfrom
AleksMat:main
Open

AleksMat wants to merge 1 commit into
google:mainfrom
AleksMat:main

Conversation

@AleksMat

Copy link
Copy Markdown

The Python standard library has included unittest.mock since Python 3.3, making the external mock backport package unnecessary. Replace the remaining import mock statements across the test suite with from unittest import mock (matching the existing Kubernetes test modules) and group and sort the affected import blocks.

Remove the mock and types-mock dev dependencies from pyproject.toml and update poetry.lock accordingly.

The Python standard library has included `unittest.mock` since Python
3.3, making the external `mock` backport package unnecessary. Replace
the remaining `import mock` statements across the test suite with
`from unittest import mock` (matching the existing Kubernetes test
modules) and group and sort the affected import blocks.

Remove the `mock` and `types-mock` dev dependencies from
`pyproject.toml` and update `poetry.lock` accordingly.
@AleksMat
AleksMat requested a review from a team as a code owner November 23, 2026 13:41
@AleksMat
AleksMat requested review from tomchop and removed request for a team November 23, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant