@@ -49,10 +49,9 @@ def test_raises_on_bad_dot_property(some_fig):
4949 e .args [0 ].find (
5050 """Bad property path:
5151layout.shapes[1].x2000
52- ^^^^^
53- Did you mean "x0"?"""
52+ ^^^^^"""
5453 )
55- >= 0
54+ and ( e . args [ 0 ]. find ( """Did you mean "x0"?""" ) >= 0 ) >= 0
5655 )
5756 assert raised
5857
@@ -69,10 +68,9 @@ def test_raises_on_bad_ancestor_dot_property(some_fig):
6968 e .args [0 ].find (
7069 """Bad property path:
7170layout.shapa[1].x2000
72- ^^^^^
73- Did you mean "shapes"?"""
71+ ^^^^^"""
7472 )
75- >= 0
73+ and ( e . args [ 0 ]. find ( """Did you mean "shapes"?""" ) >= 0 ) >= 0
7674 )
7775 assert raised
7876
@@ -118,19 +116,18 @@ def test_raises_on_bad_indexed_underscore_property(some_fig):
118116 """
119117Bad property path:
120118data[0].line_colr
121- ^^^^
122- Did you mean "color"?""" ,
119+ ^^^^""" ,
123120 )
124121 assert (
125122 (
126123 e .args [0 ].find (
127124 """Bad property path:
128125data[0].line_colr
129- ^^^^
130- Did you mean "color"?"""
126+ ^^^^"""
131127 )
132128 >= 0
133129 )
130+ and (e .args [0 ].find ("""Did you mean "color"?""" ) >= 0 )
134131 and (e_substr == e_correct_substr )
135132 )
136133 assert raised
@@ -170,10 +167,9 @@ def test_raises_on_bad_indexed_underscore_property(some_fig):
170167 e .args [0 ].find (
171168 """Bad property path:
172169line_colr
173- ^^^^
174- Did you mean "color"?"""
170+ ^^^^"""
175171 )
176- >= 0
172+ and ( e . args [ 0 ]. find ( """Did you mean "color"?""" ) >= 0 ) >= 0
177173 )
178174 and (e_substr == e_correct_substr )
179175 )
@@ -192,8 +188,7 @@ def test_raises_on_bad_indexed_underscore_property(some_fig):
192188 """
193189Bad property path:
194190txt
195- ^^^
196- Did you mean "text"?""" ,
191+ ^^^""" ,
197192 )
198193 assert raised
199194
@@ -210,8 +205,7 @@ def test_raises_on_bad_indexed_underscore_property(some_fig):
210205 """
211206Bad property path:
212207layout_title_txt
213- ^^^
214- Did you mean "text"?""" ,
208+ ^^^""" ,
215209 )
216210 # also remove the invalid Figure property string added by the Figure constructor
217211 e_substr = error_substr (
@@ -224,11 +218,11 @@ def test_raises_on_bad_indexed_underscore_property(some_fig):
224218 e .args [0 ].find (
225219 """Bad property path:
226220layout_title_txt
227- ^^^
228- Did you mean "text"?""" ,
221+ ^^^""" ,
229222 )
230223 >= 0
231224 )
225+ and (e .args [0 ].find ("""Did you mean "text"?""" ) >= 0 )
232226 and (e_substr == e_correct_substr )
233227 )
234228 assert raised
@@ -245,8 +239,7 @@ def test_raises_on_bad_indexed_underscore_property(some_fig):
245239 """
246240Bad property path:
247241ltaxis
248- ^^^^^^
249- Did you mean "lataxis"?""" ,
242+ ^^^^^^""" ,
250243 )
251244 assert raised
252245
@@ -260,19 +253,18 @@ def test_raises_on_bad_indexed_underscore_property(some_fig):
260253 """
261254Bad property path:
262255geo_ltaxis_showgrid
263- ^^^^^^
264- Did you mean "lataxis"?""" ,
256+ ^^^^^^""" ,
265257 )
266258 assert (
267259 (
268260 e .args [0 ].find (
269261 """Bad property path:
270262geo_ltaxis_showgrid
271- ^^^^^^
272- Did you mean "lataxis"?"""
263+ ^^^^^^"""
273264 )
274265 >= 0
275266 )
267+ and (e .args [0 ].find ("""Did you mean "lataxis"?""" ) >= 0 )
276268 and (e_substr == e_correct_substr )
277269 )
278270 assert raised
@@ -494,6 +486,7 @@ def _raise_bad_property_path_real():
494486 ("bogus" , "_hey_yall" ),
495487 ("^^^^^" , "^^^^" ),
496488 ('Did you mean "boxgap"' , 'Did you mean "geo"' ),
489+ ('Did you mean "boxgap"' , 'Did you mean "geo"' ),
497490 ],
498491 )
499492 check_error_string (_raise_bad_property_path_real , ValueError , correct_err_str , [])
@@ -537,7 +530,8 @@ def _raise_bad_property_path_real():
537530 [
538531 ("bogusey" , "_family" ),
539532 ("bogusey" , "_family" ),
540- ('Did you mean "size"?' , 'Did you mean "family"?' ),
533+ ('Did you mean "color"?' , 'Did you mean "family"?' ),
534+ ('Did you mean "color"?' , 'Did you mean "family"?' ),
541535 ],
542536 )
543537 # no need to replace ^^^^^ because bogus and font_ are same length
@@ -560,6 +554,7 @@ def _raise_bad_property_path_real():
560554 ("bogus" , "_" ),
561555 ("^^^^^" , "^" ),
562556 ('Did you mean "boxgap"' , 'Did you mean "geo"' ),
557+ ('Did you mean "boxgap"' , 'Did you mean "geo"' ),
563558 ],
564559 )
565560 check_error_string (_raise_bad_property_path_real , ValueError , correct_err_str , [])
@@ -581,6 +576,7 @@ def _raise_bad_property_path_real():
581576 ("bogus" , "__" ),
582577 ("^^^^^" , "^^" ),
583578 ('Did you mean "boxgap"' , 'Did you mean "geo"' ),
579+ ('Did you mean "boxgap"' , 'Did you mean "geo"' ),
584580 ],
585581 )
586582 check_error_string (_raise_bad_property_path_real , ValueError , correct_err_str , [])
@@ -645,7 +641,8 @@ def _raise_bad_property_path_real():
645641 [
646642 ("bogusey" , "_family" ),
647643 ("bogusey" , "_family" ),
648- ('Did you mean "size"?' , 'Did you mean "family"?' ),
644+ ('Did you mean "color"?' , 'Did you mean "family"?' ),
645+ ('Did you mean "color"?' , 'Did you mean "family"?' ),
649646 ],
650647 )
651648 check_error_string (_raise_bad_property_path_real , ValueError , correct_err_str , [])
0 commit comments