@@ -183,7 +183,7 @@ def test_plot_title(self):
183183
184184 @pytest .mark .slow
185185 def test_plot_multiindex (self ):
186- tuples = zip (string .ascii_letters [:10 ], range (10 ))
186+ tuples = zip (string .ascii_letters [:10 ], range (10 ), strict = True )
187187 df = DataFrame (
188188 np .random .default_rng (2 ).random ((10 , 3 )),
189189 index = MultiIndex .from_tuples (tuples ),
@@ -513,7 +513,7 @@ def test_negative_log(self):
513513
514514 def _compare_stacked_y_cood (self , normal_lines , stacked_lines ):
515515 base = np .zeros (len (normal_lines [0 ].get_data ()[1 ]))
516- for nl , sl in zip (normal_lines , stacked_lines ):
516+ for nl , sl in zip (normal_lines , stacked_lines , strict = True ):
517517 base += nl .get_data ()[1 ] # get y coordinates
518518 sy = sl .get_data ()[1 ]
519519 tm .assert_numpy_array_equal (base , sy )
@@ -920,7 +920,10 @@ def test_scatterplot_color_by_categorical(self, ordered, categories):
920920
921921 expected_yticklabels = categories
922922 result_yticklabels = [i .get_text () for i in colorbar .ax .get_ymajorticklabels ()]
923- assert all (i == j for i , j in zip (result_yticklabels , expected_yticklabels ))
923+ assert all (
924+ i == j
925+ for i , j in zip (result_yticklabels , expected_yticklabels , strict = True )
926+ )
924927
925928 @pytest .mark .parametrize ("x, y" , [("x" , "y" ), ("y" , "x" ), ("y" , "y" )])
926929 def test_plot_scatter_with_categorical_data (self , x , y ):
@@ -1131,7 +1134,7 @@ def test_boxplot_vertical_subplots(self, hist_df):
11311134 )
11321135 _check_axes_shape (axes , axes_num = 3 , layout = (1 , 3 ))
11331136 _check_ax_scales (axes , xaxis = "log" )
1134- for ax , label in zip (axes , labels ):
1137+ for ax , label in zip (axes , labels , strict = True ):
11351138 _check_text_labels (ax .get_yticklabels (), [label ])
11361139 assert len (ax .lines ) == 7
11371140
@@ -1258,7 +1261,13 @@ def test_hist_weights(self, weight_shape):
12581261 # GH 33173
12591262 weights = 0.1 * np .ones (shape = weight_shape )
12601263 df = DataFrame (
1261- dict (zip (["A" , "B" ], np .random .default_rng (2 ).standard_normal ((2 , 100 ))))
1264+ dict (
1265+ zip (
1266+ ["A" , "B" ],
1267+ np .random .default_rng (2 ).standard_normal ((2 , 100 )),
1268+ strict = True ,
1269+ )
1270+ )
12621271 )
12631272
12641273 ax1 = _check_plot_works (df .plot , kind = "hist" , weights = weights )
@@ -1679,7 +1688,7 @@ def test_pie_df_subplots(self):
16791688 assert len (axes ) == len (df .columns )
16801689 for ax in axes :
16811690 _check_text_labels (ax .texts , df .index )
1682- for ax , ylabel in zip (axes , df .columns ):
1691+ for ax , ylabel in zip (axes , df .columns , strict = True ):
16831692 assert ax .get_ylabel () == ""
16841693
16851694 def test_pie_df_labels_colors (self ):
@@ -2381,7 +2390,7 @@ def test_x_string_values_ticks(self):
23812390 ax = df .plot .area (x = "day" )
23822391 ax .set_xlim (- 1 , 3 )
23832392 xticklabels = [t .get_text () for t in ax .get_xticklabels ()]
2384- labels_position = dict (zip (xticklabels , ax .get_xticks ()))
2393+ labels_position = dict (zip (xticklabels , ax .get_xticks (), strict = False ))
23852394 # Testing if the label stayed at the right position
23862395 assert labels_position ["Monday" ] == 0.0
23872396 assert labels_position ["Tuesday" ] == 1.0
@@ -2399,7 +2408,7 @@ def test_x_multiindex_values_ticks(self):
23992408 ax = df .plot ()
24002409 ax .set_xlim (- 1 , 4 )
24012410 xticklabels = [t .get_text () for t in ax .get_xticklabels ()]
2402- labels_position = dict (zip (xticklabels , ax .get_xticks ()))
2411+ labels_position = dict (zip (xticklabels , ax .get_xticks (), strict = False ))
24032412 # Testing if the label stayed at the right position
24042413 assert labels_position ["(2012, 1)" ] == 0.0
24052414 assert labels_position ["(2012, 2)" ] == 1.0
@@ -2475,7 +2484,7 @@ def test_group_subplot(self, kind):
24752484 assert len (axes ) == 3 # 2 groups + single column a
24762485
24772486 expected_labels = (["b" , "e" ], ["c" , "d" ], ["a" ])
2478- for ax , labels in zip (axes , expected_labels ):
2487+ for ax , labels in zip (axes , expected_labels , strict = True ):
24792488 if kind != "pie" :
24802489 _check_legend_labels (ax , labels = labels )
24812490 if kind == "line" :
0 commit comments