Skip to content
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

migrate where possible from external mock package to stdlib unittest.mock #1600

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eli-schwartz
Copy link

@eli-schwartz eli-schwartz commented Dec 3, 2023

It was moved to the stdlib in python 3.3, and the PyPI version is a backport for python versions less than 3.3.

A couple of features from newer python versions that are greater than the minimum supported version are used. Add if/else guards to utilize the backport on older versions of python:

  • assert_called_once was introduced in python 3.6
  • Unstarted patchers were introduced in python 3.8

@az0 az0 self-assigned this Dec 3, 2023
@az0 az0 modified the milestones: 4.6, 4.6.2 Dec 3, 2023
@eli-schwartz eli-schwartz force-pushed the stdlib-mock branch 2 times, most recently from 3253128 to 68e454f Compare December 4, 2023 07:11
@eli-schwartz eli-schwartz changed the title migrate from external mock package to stdlib unittest.mock migrate where possible from external mock package to stdlib unittest.mock Dec 4, 2023
…mock

It was moved to the stdlib in python 3.3, and the PyPI version is a
backport for python versions less than 3.3.

A couple of features from newer python versions that are greater than
the minimum supported version are used. Add if/else guards to utilize
the backport on older versions of python:

- assert_called_once was introduced in python 3.6

- Unstarted patchers were introduced in python 3.8
@eli-schwartz
Copy link
Author

eli-schwartz commented Dec 4, 2023

Got CI to pass by conditionalizing the use of the stdlib based on python >=3.8.

EDIT: the tests pass but travis hangs while "waiting for the job to finish" and exceed the max time...

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.

None yet

2 participants