Skip to content

Commit f46a56a

Browse files
committed
Rename a test_linestyle_accent to test_linestyle_variants and change getting getting value from ls_mapper_r
1 parent 9e70828 commit f46a56a

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/matplotlib/lines.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -972,11 +972,7 @@ def set_linestyle(self, linestyle):
972972
break
973973

974974
if linestyle not in self._lineStyles:
975-
if linestyle in ls_mapper_r:
976-
linestyle = ls_mapper_r[linestyle]
977-
else:
978-
verbose.report('Unrecognized line style %s, %s' %
979-
(linestyle, type(linestyle)))
975+
linestyle = ls_mapper_r.get(linestyle, linestyle)
980976
if linestyle in [' ', '']:
981977
linestyle = 'None'
982978
self._linestyle = linestyle

lib/matplotlib/tests/test_lines.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_line_colors():
9393

9494

9595
@cleanup
96-
def test_linestyle_accents():
96+
def test_linestyle_variants():
9797
fig = plt.figure()
9898
ax = fig.add_subplot(1, 1, 1)
9999
for ls in ["-", "solid", "--", "dashed",

0 commit comments

Comments
 (0)