Skip to content

Commit 129ce70

Browse files
authored
TST: Make test_index_alignment_between_series less brittle (#3359)
test_index_alignment_between_series fails on Windows but passes on Linux. The reason is that the indices of the expected Series are created using the default dtype of an integer np.arange which is int64 on Linux but int32 on Windows. Now the expected index is created the same way as the x/y-indices and hence results in the same dtype.
1 parent b9333f9 commit 129ce70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/_core/test_data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,9 @@ def test_index_alignment_between_series(self):
187187

188188
p = PlotData(None, {"x": x, "y": y})
189189

190-
x_col_expected = pd.Series([10, 20, 30, np.nan, np.nan], np.arange(1, 6))
191-
y_col_expected = pd.Series([np.nan, np.nan, 300, 400, 500], np.arange(1, 6))
190+
idx_expected = [1, 2, 3, 4, 5]
191+
x_col_expected = pd.Series([10, 20, 30, np.nan, np.nan], idx_expected)
192+
y_col_expected = pd.Series([np.nan, np.nan, 300, 400, 500], idx_expected)
192193
assert_vector_equal(p.frame["x"], x_col_expected)
193194
assert_vector_equal(p.frame["y"], y_col_expected)
194195

0 commit comments

Comments
 (0)