-
Notifications
You must be signed in to change notification settings - Fork 619
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 creating colormap from list of Color objects #1859
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Czaki Thanks for spotting and fixing this! Just one minor thing, otherwise LGTM. Adding more tests is appreciated but not mandatory.
vispy/color/tests/test_color.py
Outdated
@@ -344,4 +344,9 @@ def test_normalize(): | |||
assert_allclose([y.min(), y.max()], [0.2975, 1-0.2975], 1e-1, 1e-1) | |||
|
|||
|
|||
def test_colormap_creation(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are already here, do you mind adding some more tests for the different parametrizations?
I do not understand travis fail. |
Looks like a pytest-sugar incompatibility with newer pytest: conda-forge/pytest-sugar-feedstock#9 and has been released as pytest-sugar 0.9.3 but isn't available on conda-forge yet: conda-forge/pytest-sugar-feedstock#9 I've commented there to have it merged. After it is merged, we wait an hour, then I'll restart the tests. |
Ugh looks like it is broken with 0.9.3 too: pytest-dev/pytest#3170 (comment) You could try limiting the version of pytest-sugar in the travis configs or just wait until things are released. |
I change sugar version but there is error:
|
That's actually expected error for that set of tests I think. And sorry I was wrong, the problem wasn't necessarily pytest-sugar but its incompatibility with the new version of pytest. I think |
So any changes are requested? Which version of pytest is ok? |
|
Fixed |
@kmuehlbauer Are you ok with this then? Feel free to merge if you are. |
Thanks again for this fix. I do not want to force this upon you. Could you by chance make two commits out of this four, one with your fixes and one with the travis changes? It would be easier to reverse the travis-changes, when fixed upstream. Normally we would have squash-merged. If you are unsure I can do it, keeping your authoring information intact. Please let me know. |
fixes from review
limit pytest on travis block pytest-sugar 0.9.3
Done |
@Czaki Thanks again! |
fix #1858 with adding check if any list member is instance of
Color
orColorArray