-
Notifications
You must be signed in to change notification settings - Fork 107
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
mock.patch.object ... autospec=True does not work #264
Comments
Here is my reproducer for the failure: http://fpaste.org/242638/ I was told by someone that the same regression happened between Python 3.4.0 and 3.4.2. |
This includes 2 classes of fixes (and 1 skip) for mock. The first is the change in allowed values for assert_has_calls - testing-cabal/mock#263 The second is a yet unsolved bug around the use of autospec testing-cabal/mock#264 The skip is because something has changed with mock.open that is causing the vhduils test to fail. We don't know why, but it's one test to skip. This also includes a brute force fix for tox -e docs, because pip is no longer respecting the sphinx pin in test requirements. This has to be landed with the other changes because they won't work without it. Change-Id: Id835d080a1ada52cbd3f24dad9bab5eeb2f29a54 Partial-Bug: 1473401
Project: openstack/nova 4442979e71bb09ff9b71604c0dddd37c2bede04d Fix for mock-1.1.0 This includes 2 classes of fixes (and 1 skip) for mock. The first is the change in allowed values for assert_has_calls - testing-cabal/mock#263 The second is a yet unsolved bug around the use of autospec testing-cabal/mock#264 The skip is because something has changed with mock.open that is causing the vhduils test to fail. We don't know why, but it's one test to skip. This also includes a brute force fix for tox -e docs, because pip is no longer respecting the sphinx pin in test requirements. This has to be landed with the other changes because they won't work without it. Change-Id: Id835d080a1ada52cbd3f24dad9bab5eeb2f29a54 Partial-Bug: 1473401
This was reported upstream as http://bugs.python.org/issue23661 and I'm applying the patch and backporting now. |
Fixed in Python 3.6 and in mock 1.1.3 [backwards compat bugfix]. |
From https://github.com/openstack/nova/blob/master/nova/tests/unit/virt/xenapi/client/test_session.py#L143-L158
No longer works.
The current work around is change 'autospec' to 'spec'. Not sure the root issue, lifeless sorted out the fix. This bug is here for tracking the resolution.
The text was updated successfully, but these errors were encountered: