8000 Reduce usage of mocks in `test_clinic.py` · Issue #107713 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Reduce usage of mocks in test_clinic.py #107713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AlexWaygood opened this issue Aug 7, 2023 · 0 comments · Fixed by #107714
Closed

Reduce usage of mocks in test_clinic.py #107713

AlexWaygood opened this issue Aug 7, 2023 · 0 comments · Fixed by #107714
Assignees
Labels
tests Tests in the Lib/test dir topic-argument-clinic type-feature A feature request or enhancement

Comments

@AlexWaygood
Copy link
Member
AlexWaygood commented Aug 7, 2023

Feature or enhancement

We should reduce usage of mock objects in test_clinic.py, such as FakeClinic, FakeConvertersDict, FakeConverterFactory and FakeConverter.

Pitch

There doesn't seem to be a strong reason to use mock objects like these in test_clinic.py, since the "real" objects in clinic.py are easy and cheap to construct. Removing the mock objects from test_clinic.py will reduce the maintenance burden, as it reduces the risk that the mock objects drift apart from the real implementation, and reduces the risk that the mock objects will have subtle behaviour differences to the real implementation.

Linked PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir topic-argument-clinic type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0