8000 Dep contourset vminmax by tacaswell · Pull Request #5552 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Dep contourset vminmax #5552

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 2 commits into from
Nov 24, 2015
Merged
Changes from 1 commit
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
Prev Previous commit
TST: ContourSet vmin/vmax deprecation warnings
  • Loading branch information
tacaswell committed Nov 24, 2015
commit 4c8205f001528382c7861eeb0b3db5a34f38a0ff
19 changes: 19 additions & 0 deletions lib/matplotlib/tests/test_contour.py
Original file line number Diff line number Diff line change
7565 Expand Up @@ -279,6 +279,25 @@ def test_contourf_decreasing_levels():
assert_equal(len(w), 2)


@cleanup
def test_vminvmax_warning():
z = [[0.1, 0.3], [0.5, 0.7]]
plt.figure()
cs = plt.contourf(z, [0.0, 1.0])

with warnings.catch_warnings(record=True) as w:
cs.vmin
assert len(w) == 1
assert (str(w[0].message).startswith(
("vmin is deprecated and will be removed in 2.2 ")))

with warnings.catch_warnings(record=True) as w:
cs.vmax
assert len(w) == 1
assert (str(w[0].message).startswith(
("vmax is deprecated and will be removed in 2.2 ")))


if __name__ == '__main__':
import nose
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)
0