We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6db591 commit 50e3717Copy full SHA for 50e3717
lib/matplotlib/tests/test_cbook.py
@@ -15,7 +15,7 @@
15
16
from matplotlib import _api, cbook
17
import matplotlib.colors as mcolors
18
-from matplotlib.cbook import delete_masked_points
+from matplotlib.cbook import delete_masked_points, strip_math
19
20
21
class Test_delete_masked_points:
@@ -918,6 +918,12 @@ def test_safe_first_element_with_none():
918
assert actual is not None and actual == datetime_lst[1]
919
920
921
+def test_strip_math():
922
+ assert strip_math(r'1 \times 2') == r'1 \times 2'
923
+ assert strip_math(r'$1 \times 2$') == '1 x 2'
924
+ assert strip_math(r'$\rm{hi}$') == 'hi'
925
+
926
927
@pytest.mark.parametrize('fmt, value, result', [
928
('%.2f m', 0.2, '0.20 m'),
929
('{:.2f} m', 0.2, '0.20 m'),
0 commit comments