-
Notifications
You must be signed in to change notification settings - Fork 21
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
Test to guard against styling side-effects. #160
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.
my eyes are bleeding
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.
How about a normal distribution? They're more aesthetically pleasing.
(Also perhaps a more intelligent test since I'm using the HistogramWidget
.)
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.
my eyes were bleeding at the use of jet
mainly, so the histogram is 👍 much better
If you like this, I'll force-push a squash to save the repo size.
|
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.
Nice! Please do squash this into one commit, and feel free to self-merge when that's done
f6ef269
to
6af9ce0
Compare
Use plt.subplots for safety. And no longer need copy.deepcopy. Save eyes and make a lovely histogram.
6af9ce0
to
aede1f8
Compare
I think the auto-merge is smart enough to disregard your approval because the commit hash changed (?) |
Developed along the way to battle-hardening #156.
Here is a test to guard against re-introducing #64.
Relates to
Testing
Can be tested by dumping a
matplotlib.style.use("Solarize_Light2")
in the middle of the test function... causing it to fail as expected with:Notes to the reviewer
Doesn't actually have to go onto
main
, but... it can do. And doesn't hurt? Especially if we abandon #2. In any case, I will cherry-pick it over onto #156.I couldn't think of a smart way to freeze the style and compare pre- vs post- style change... but a dumb
mark.mpl_image_compare
works. Very happy if there's some Stansby pytest/mpl knowledge™️ that helps here.