Hi John, IIRC, a dict has its keys automatically sorted in the output. However, if the dict is inside of another object, then no sorting is done. So if it is a simple dict with a total ordering on the keys, then you can simply put the output. You can also run sorted() on the items if they dicts are inside of other objects. Otherwise you might be better off testing the individual aspects you want, such as specific values are correct. Could you point to which ticket and/or test you want?
Best, Travis On Friday, February 5, 2021 at 3:06:52 AM UTC+10 john.c...@gmail.com wrote: > Can someone remind me the preferred way to get doctests to pass when > the output -- which we do want to include in the docstring -- includes > a dict whose keys come out in random order? > > John > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/9ef9c6c5-f76c-4853-a1d9-e7302d7aec75n%40googlegroups.com.