-
Notifications
You must be signed in to change notification settings - Fork 409
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
Fix two test failures with latest mock #205
Comments
I think, this issue can be related — #189 |
Mmm, indeed, I should have noticed that. @alex-downtown Is that FreeBSD for #189 ? |
Tested on OS X, but reproduces on Linux as well. |
cc @brandur @stripe/api-libraries Hey @koobs, thanks for reporting this. I've investigated a bit and here's what I found. As you noticed, we currently force The For instance, in This seems non-trivial to fix, as we also need to be able to differentiate between a not-updated sub-object and a sub-object that we explicitly want to set to an empty dict to reset it (see To illustrate:
|
@olivierbellone Thanks for digging into this! So tests were written for the library that could never be reasonably expected to pass? Ugh. Do you think it might be possible to update the tests to assert on what would actually happen (i.e. non-empty serializations)? Obviously not ideal because it doesn't seem to be how the library was designed to work, but such a fix might allow us to get mock upgraded and give us some breathing room to take a look at the other issue. |
So I think there are two things here. First, we should upgrade mock to `>=1.3.0', even though it causes the tests to fail. This represents where we are now, so we don't want to hide that fact anymore. We can fix the actual failing tests in another PR. |
Right on. It does seem like our current approach with mock versioning is just sweeping the problem under the rug. IMO though, we should wait until someone is committed to fixing the failing tests before applying this change. Even if the tests run in their current state are wrong, having a green test suite is still useful in that it allows us to check integration against other unrelated changes. |
@kyleconroy +1 |
- Update PORTVERSION and distinfo checksum (1.29.1) - Add LICENSE_FILE - Update TEST depends and test target - Update test target environment variable [1] - Remove TESTS option bits accordingly - Patch setup.py tests_require to allow the latest version of mock [2] - Remove patch to setup.py:package_data (upstreamed) [3] Changes: https://github.com/stripe/stripe-python/blob/v1.29.1/CHANGELOG [1] stripe/stripe-python#172 [2] stripe/stripe-python#205 [3] stripe/stripe-python#170 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@409384 35697150-7ecd-e111-bb59-0022644237b5
- Update PORTVERSION and distinfo checksum (1.29.1) - Add LICENSE_FILE - Update TEST depends and test target - Update test target environment variable [1] - Remove TESTS option bits accordingly - Patch setup.py tests_require to allow the latest version of mock [2] - Remove patch to setup.py:package_data (upstreamed) [3] Changes: https://github.com/stripe/stripe-python/blob/v1.29.1/CHANGELOG [1] stripe/stripe-python#172 [2] stripe/stripe-python#205 [3] stripe/stripe-python#170
Awesome stuff, thank you all :) |
- Update PORTVERSION and distinfo checksum (1.29.1) - Add LICENSE_FILE - Update TEST depends and test target - Update test target environment variable [1] - Remove TESTS option bits accordingly - Patch setup.py tests_require to allow the latest version of mock [2] - Remove patch to setup.py:package_data (upstreamed) [3] Changes: https://github.com/stripe/stripe-python/blob/v1.29.1/CHANGELOG [1] stripe/stripe-python#172 [2] stripe/stripe-python#205 [3] stripe/stripe-python#170
Since it's easy to forget, because currently setup.py:tests_require = mock == x, this is a task to address the two failures when running the stripe test suite with the latest version (currently 1.3.0) mock. Once solved, the dependency can then be updated to
>=1.3.0
, and stripe development can get back to proactively testing itself against newer versions of mock in the CI environmentThe text was updated successfully, but these errors were encountered: