Skip to content

Commit b21d67d

Browse files
authored
Add import_or_fail decorator to lagranginan tests (#707)
* Update test_lagrangian.py
1 parent da40b3f commit b21d67d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/datapipes/test_lagrangian.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ def test_lagrangian_dataset_constructor(data_dir, device, pytestconfig):
6060
assert graph.ndata["y"].shape[-1] > 0 # node targets
6161

6262

63+
@import_or_fail(["tensorflow", "dgl"])
6364
@pytest.mark.parametrize("device", ["cuda:0", "cpu"])
64-
def test_graph_construction(device):
65+
def test_graph_construction(device, pytestconfig):
6566
from modulus.datapipes.gnn.lagrangian_dataset import compute_edge_index
6667

6768
mesh_pos = torch.tensor([[0.0, 0.0], [0.01, 0.0], [1.0, 1.0]], device=device)

0 commit comments

Comments
 (0)