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

Move from mocker -> mock (python 3 transition) #2418

Closed
ubuntu-server-builder opened this issue May 10, 2023 · 4 comments
Closed

Move from mocker -> mock (python 3 transition) #2418

ubuntu-server-builder opened this issue May 10, 2023 · 4 comments
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1258720

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = 2022-03-01T10:41:57.444769+00:00
date_created = 2013-12-07T03:02:37.402087+00:00
date_fix_committed = 2022-03-01T10:41:57.444769+00:00
date_fix_released = 2022-03-01T10:41:57.444769+00:00
id = 1258720
importance = medium
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1258720
milestone = None
owner = harlowja
owner_name = Joshua Harlow
private = False
status = fix_released
submitter = harlowja
submitter_name = Joshua Harlow
tags = []
duplicates = []

Launchpad user Joshua Harlow(harlowja) wrote on 2013-12-07T03:02:37.402087+00:00

It appears that mock is the mocking library going forward in python so it will likely be useful to transition from mocker (used in cloud-init) to mock so that cloud-init is more future compatible. https://pypi.python.org/pypi/mock exists for python2.5+ so it seems like if we transition then it will be less painful later.

@ubuntu-server-builder ubuntu-server-builder added the launchpad Migrated from Launchpad label May 10, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2014-07-28T14:02:13.167132+00:00

woudl be nice to move a lot of our tests to more consistently using a single mock/patch interface.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Dan Watkins(oddbloke) wrote on 2014-09-12T14:15:38.144287+00:00

I've pushed up an example of what replacing mocker with mock might look like, check the diff out at http://bazaar.launchpad.net/~daniel-thewatkins/cloud-init/replace-mocker/revision/1013?start_revid=1013 or the full file at http://bazaar.launchpad.net/~daniel-thewatkins/cloud-init/replace-mocker/view/head:/tests/unittests/test_distros/test_netconfig.py

This is only a POC as (amongst other things) I haven't updated requirements to include mock.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Michael Vogt(mvo) wrote on 2014-11-17T16:22:15.914188+00:00

I also pushed some code to lp:~mvo/cloud-init/py2-3 but there is a lot of work todo.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user James Falcon(falcojr) wrote on 2022-03-01T10:41:51.188057+00:00

mock is now used everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant