Skip to content

Commit c7c47a2

Browse files
authored
TST: fix dtype issues in tests (#140)
1 parent d564310 commit c7c47a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

xvec/tests/test_accessor.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,12 @@ def test_to_geodataframe_wide(geom_array, traffic_counts_array_named):
518518
)
519519

520520
expected = pd.DataFrame(
521+
1.0,
521522
columns=pd.MultiIndex.from_product(
522-
[["traffic_counts"], ["car", "bike", "walk"]], names=["mode", ""]
523+
[["traffic_counts"], ["car", "bike", "walk"]], names=["", "mode"]
523524
),
524525
index=range(2),
525-
).fillna(1.0)
526+
).astype(float)
526527
expected["origin"] = geom_array
527528
expected = expected.set_geometry("origin", crs=26915)
528529

@@ -551,11 +552,12 @@ def test_to_geodataframe_wide(geom_array, traffic_counts_array_named):
551552
).xvec.set_geom_indexes(["origin"], crs=26915)
552553

553554
expected = pd.DataFrame(
555+
1.0,
554556
columns=pd.MultiIndex.from_product(
555-
[["count", "time"], ["car", "bike", "walk"]], names=["mode", ""]
557+
[["count", "time"], ["car", "bike", "walk"]], names=["", "mode"]
556558
),
557559
index=range(2),
558-
).fillna(1.0)
560+
).astype(float)
559561
expected["origin"] = geom_array
560562
expected = expected.set_geometry("origin", crs=26915)
561563

0 commit comments

Comments
 (0)