Skip to content

Attempt to import unittest.mock first#310

Closed
s-t-e-v-e-n-k wants to merge 1 commit intopahaz:masterfrom
s-t-e-v-e-n-k:use-unittest-mock
Closed

Attempt to import unittest.mock first#310
s-t-e-v-e-n-k wants to merge 1 commit intopahaz:masterfrom
s-t-e-v-e-n-k:use-unittest-mock

Conversation

@s-t-e-v-e-n-k
Copy link
Copy Markdown

As the standard library has included mock since 3.3, we should attempt to use it first. Add a fallback if we can't import it, and only install it if required with a marker.

Closes #259

As the standard library has included mock since 3.3, we should attempt
to use it first. Add a fallback if we can't import it, and only install
it if required with a marker.

Closes pahaz#259
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 12, 2026

Coverage Status

coverage: 91.667%. remained the same
when pulling 5949d2a on s-t-e-v-e-n-k:use-unittest-mock
into dc07328 on pahaz:master.

Copy link
Copy Markdown

@bmos bmos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement to avoid installing unnecessary dependencies, but a duplicate of #282.

@s-t-e-v-e-n-k
Copy link
Copy Markdown
Author

Closing in favor of #282

@s-t-e-v-e-n-k s-t-e-v-e-n-k deleted the use-unittest-mock branch April 8, 2026 02:42
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.

use unittest.mock instead of mock as a fallback

3 participants