Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit e23be2f

Browse files
committed
17106: fix assert in sage.misc.c3_controlled doctest
1 parent 6996fd8 commit e23be2f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/sage/misc/c3_controlled.pyx

+5-4
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,12 @@ algorithms succeed; along the way, we collect some statistics::
276276
sage: stats = []
277277
sage: for l in L:
278278
....: x = HierarchyElement(10, l.to_poset())
279-
....: try:
280-
....: x.mro_standard
281-
....: assert False
282-
....: except:
279+
....: try: # Check that x.mro_standard always fails with a ValueError
280+
....: x.mro_standard
281+
....: except ValueError:
283282
....: pass
283+
....: else:
284+
....: assert False
284285
....: assert x.mro == list(P)
285286
....: assert x.mro_controlled == list(P)
286287
....: assert x.all_bases_len() == 15

0 commit comments

Comments
 (0)