-
Notifications
You must be signed in to change notification settings - Fork 19
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
RFC: Allow Redis fixture to use decode_responses
parameter
#215
Conversation
I'm perfectly happy with this also being a config option, as you have laid out. But it probably also makes sense to make it an argument to the fixture creation function: Basically as you've defined it, it will apply to all Also, if you could write a simple test demonstrating the option actually has the desired effect, i'd appreciate it. Otherwise, i might be able to do so next week. |
@DanCardin thanks for the input! Makes sense to have it per fixture, just pushed those changes. I modified all tests to avoid repeating them, parametrizing them with a fixture with There are a couple styling changes that come from running |
to be clear, i'd have been fine with the config-level option also. but i also dont mind it not existing, up to you. I suspect all the tests failing is because the tests are no longer directly depending on the fixture, which means they wont get I'd personally be happy to leave the existing set of tests as-is, and have 1 dedicated test to verify the option applies decoding |
Ok! Let me revert those changes and check if it works on CI. |
@DanCardin Does it look better now? As for the config level option, could you please check if this follows the desired preference level of the lib? decode_responses=decode_responses or pmr_redis_config.decode_responses, |
|
Pull Request Test Coverage Report for Build 9503124059Details
💛 - Coveralls |
Should I merge? Do you need anything else from my side for a release? |
Should be released in 2.12.0 |
For the redis client, the user might prefer to use the decoded response. There's no way to pass kwargs or similar, and I thought this might be reasonable.
For most of my usecases, I'm setting that parameter and would like to expect the same from the fixture.