Skip to content

Attempt to import unittest.mock first#310

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

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

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

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.

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

2 participants