|
1 |
| -# Copyright (c) 2020-2023, NVIDIA CORPORATION. |
| 1 | +# Copyright (c) 2020-2024, NVIDIA CORPORATION. |
2 | 2 | # Licensed under the Apache License, Version 2.0 (the "License");
|
3 | 3 | # you may not use this file except in compliance with the License.
|
4 | 4 | # You may obtain a copy of the License at
|
@@ -171,7 +171,8 @@ def test_hyperedges(categorical_metadata):
|
171 | 171 | if categorical_metadata:
|
172 | 172 | edges = edges.astype({"edge_type": "category"})
|
173 | 173 |
|
174 |
| - assert_frame_equal(edges, h["edges"], check_dtype=False) |
| 174 | + # check_like ignores the order of columns as long as all correct ones are present |
| 175 | + assert_frame_equal(edges, h["edges"], check_dtype=False, check_like=True) |
175 | 176 | for (k, v) in [("entities", 12), ("nodes", 15), ("edges", 12), ("events", 3)]:
|
176 | 177 | assert len(h[k]) == v
|
177 | 178 |
|
@@ -266,7 +267,8 @@ def test_drop_edge_attrs(categorical_metadata):
|
266 | 267 | if categorical_metadata:
|
267 | 268 | edges = edges.astype({"edge_type": "category"})
|
268 | 269 |
|
269 |
| - assert_frame_equal(edges, h["edges"], check_dtype=False) |
| 270 | + # check_like ignores the order of columns as long as all correct ones are present |
| 271 | + assert_frame_equal(edges, h["edges"], check_dtype=False, check_like=True) |
270 | 272 |
|
271 | 273 | for (k, v) in [("entities", 9), ("nodes", 12), ("edges", 9), ("events", 3)]:
|
272 | 274 | assert len(h[k]) == v
|
@@ -308,7 +310,8 @@ def test_drop_edge_attrs_direct(categorical_metadata):
|
308 | 310 | if categorical_metadata:
|
309 | 311 | edges = edges.astype({"edge_type": "category"})
|
310 | 312 |
|
311 |
| - assert_frame_equal(edges, h["edges"], check_dtype=False) |
| 313 | + # check_like ignores the order of columns as long as all correct ones are present |
| 314 | + assert_frame_equal(edges, h["edges"], check_dtype=False, check_like=True) |
312 | 315 |
|
313 | 316 | for (k, v) in [("entities", 9), ("nodes", 9), ("edges", 6), ("events", 0)]:
|
314 | 317 | assert len(h[k]) == v
|
|
0 commit comments