Skip to content

Commit 9686e22

Browse files
committed
Fix error message checking in test
We were checking the ExecInfo rather than the underlying exception. Pytest must have removed the __str__ implementation at some point.
1 parent 0d54a35 commit 9686e22

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/routing_table/test_routing_table_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ def test_routing_tree_to_tables_repeated_key_mask_fork_not_allowed():
262262
with pytest.raises(MultisourceRouteError) as err:
263263
routing_tree_to_tables(routes, net_keys)
264264

265-
assert "(1, 1)" in str(err) # Co-ordinate of the fork
266-
assert "0x00000000" in str(err) # Key that causes the problem
267-
assert "0x0000000f" in str(err) # Mask that causes the problem
265+
assert "(1, 1)" in str(err.value) # Co-ordinate of the fork
266+
assert "0x00000000" in str(err.value) # Key that causes the problem
267+
assert "0x0000000f" in str(err.value) # Mask that causes the problem
268268

269269

270270
def test_build_routing_table_target_lengths():

0 commit comments

Comments
 (0)