Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7809 from lkilcher/marker_verts_bug
Fix for marker verts bug
- Loading branch information
Showing
2 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import numpy as np | ||
from matplotlib import markers | ||
|
||
import pytest | ||
|
||
|
||
def test_markers_valid(): | ||
marker_style = markers.MarkerStyle() | ||
mrk_array = np.array([[-0.5, 0], | ||
[0.5, 0]]) | ||
# Checking this doesn't fail. | ||
marker_style.set_marker(mrk_array) | ||
|
||
|
||
def test_markers_invalid(): | ||
marker_style = markers.MarkerStyle() | ||
mrk_array = np.array([[-0.5, 0, 1, 2, 3]]) | ||
# Checking this does fail. | ||
with pytest.raises(ValueError): | ||
marker_style.set_marker(mrk_array) |