8000 FIX: Clean up in the new quiverkey test; make new figs in scale tests by jkseppan · Pull Request #7726 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

FIX: Clean up in the new quiverkey test; make new figs in scale tests #7726

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

Merged
merged 1 commit into from
Jan 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
FIX: Clean up in the new quiverkey test; make new figs in scale tests
Merging the new quiverkey test seemed to cause nondeterministic
failures of test_log_scales and test_logit_scales. I couldn't reproduce
but here's a guess: the new test creates a figure and doesn't close it,
and the scale tests just call plt.subplot which would usually create
a new figure but if the test gets executed right after the new test,
they just add a subplot on the existing figure.
  • Loading branch information
jkseppan committed Jan 2, 2017
commit 98e6c95bfbdfe3c54be45f36b9c67af0fae81ee2
1 change: 1 addition & 0 deletions lib/matplotlib/tests/test_quiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def test_bad_masked_sizes():
ax.barbs(x, y, u, v)


@cleanup
def test_quiverkey_angles():
# Check that only a single arrow is plotted for a quiverkey when an array
# of angles is given to the original quiver plot
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@image_comparison(baseline_images=['log_scales'], remove_text=True)
def test_log_scales():
ax = plt.subplot(122, yscale='log', xscale='symlog')
ax = plt.figure().add_subplot(122, yscale='log', xscale='symlog')

ax.axvline(24.1)
ax.axhline(24.1)
Expand All @@ -17,7 +17,7 @@ def test_log_scales():
@image_comparison(baseline_images=['logit_scales'], remove_text=True,
extensions=['png'])
def test_logit_scales():
ax = plt.subplot(111, xscale='logit')
ax = plt.figure().add_subplot(111, xscale='logit')

# Typical extinction curve for logit
x = np.array([0.001, 0.003, 0.01, 0.03, 0.1, 0.2, 0.3, 0.4, 0.5,
Expand Down
0