Skip to content

Commit e4bdaa9

Browse files
committed
fix: expect more warnings emitted during tests
1 parent 335993d commit e4bdaa9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/test_write_graph.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ def test_write_graph_lgl(simple_graph, tmp_path, datadir):
110110
path_str = str(path)
111111

112112
# Write to a file specified by its filename
113-
with warns(IgraphWarning, match="Names attribute"):
113+
with (
114+
warns(IgraphWarning, match="Names attribute"),
115+
warns(IgraphWarning, match="Weights attribute"),
116+
):
114117
write_graph_lgl(simple_graph, path_str)
115118
assert path.read_text() == expected
116119
path.unlink()
@@ -133,7 +136,10 @@ def test_write_graph_ncol(simple_graph, tmp_path, datadir):
133136
path_str = str(path)
134137

135138
# Write to a file specified by its filename
136-
with warns(IgraphWarning, match="Names attribute"):
139+
with (
140+
warns(IgraphWarning, match="Names attribute"),
141+
warns(IgraphWarning, match="Weights attribute"),
142+
):
137143
write_graph_ncol(simple_graph, path_str)
138144
assert path.read_text() == expected
139145
path.unlink()

0 commit comments

Comments
 (0)