Skip to content

Commit cc91bfa

Browse files
author
WenkelF
committed
Reformatting with black
1 parent 4240bbb commit cc91bfa

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

tests/test_datamodule.py

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -241,20 +241,32 @@ def test_caching(self):
241241
batch_from_disk = next(iter(cached_train_loader_from_disk))
242242

243243
# Features are the same
244-
np.testing.assert_array_almost_equal(batch["features"].edge_index, batch_from_ram["features"].edge_index)
245-
np.testing.assert_array_almost_equal(batch["features"].edge_index, batch_from_disk["features"].edge_index)
244+
np.testing.assert_array_almost_equal(
245+
batch["features"].edge_index, batch_from_ram["features"].edge_index
246+
)
247+
np.testing.assert_array_almost_equal(
248+
batch["features"].edge_index, batch_from_disk["features"].edge_index
249+
)
246250

247251
assert batch["features"].num_nodes == batch_from_ram["features"].num_nodes
248252
assert batch["features"].num_nodes == batch_from_disk["features"].num_nodes
249253

250-
np.testing.assert_array_almost_equal(batch["features"].edge_weight, batch_from_ram["features"].edge_weight)
251-
np.testing.assert_array_almost_equal(batch["features"].edge_weight, batch_from_disk["features"].edge_weight)
254+
np.testing.assert_array_almost_equal(
255+
batch["features"].edge_weight, batch_from_ram["features"].edge_weight
256+
)
257+
np.testing.assert_array_almost_equal(
258+
batch["features"].edge_weight, batch_from_disk["features"].edge_weight
259+
)
252260

253261
np.testing.assert_array_almost_equal(batch["features"].feat, batch_from_ram["features"].feat)
254262
np.testing.assert_array_almost_equal(batch["features"].feat, batch_from_disk["features"].feat)
255263

256-
np.testing.assert_array_almost_equal(batch["features"].edge_feat, batch_from_ram["features"].edge_feat)
257-
np.testing.assert_array_almost_equal(batch["features"].edge_feat, batch_from_disk["features"].edge_feat)
264+
np.testing.assert_array_almost_equal(
265+
batch["features"].edge_feat, batch_from_ram["features"].edge_feat
266+
)
267+
np.testing.assert_array_almost_equal(
268+
batch["features"].edge_feat, batch_from_disk["features"].edge_feat
269+
)
258270

259271
np.testing.assert_array_almost_equal(batch["features"].batch, batch_from_ram["features"].batch)
260272
np.testing.assert_array_almost_equal(batch["features"].batch, batch_from_disk["features"].batch)
@@ -263,8 +275,12 @@ def test_caching(self):
263275
np.testing.assert_array_almost_equal(batch["features"].ptr, batch_from_disk["features"].ptr)
264276

265277
# Labels are the same
266-
np.testing.assert_array_almost_equal(batch["labels"].graph_task_1, batch_from_ram["labels"].graph_task_1)
267-
np.testing.assert_array_almost_equal(batch["labels"].graph_task_1, batch_from_disk["labels"].graph_task_1)
278+
np.testing.assert_array_almost_equal(
279+
batch["labels"].graph_task_1, batch_from_ram["labels"].graph_task_1
280+
)
281+
np.testing.assert_array_almost_equal(
282+
batch["labels"].graph_task_1, batch_from_disk["labels"].graph_task_1
283+
)
268284

269285
np.testing.assert_array_almost_equal(batch["labels"].x, batch_from_ram["labels"].x)
270286
np.testing.assert_array_almost_equal(batch["labels"].x, batch_from_disk["labels"].x)

0 commit comments

Comments
 (0)