Thanks for the suggestions (which I did not see right away as I had my group preference set to daily digest -- it's annoying that google does not make ex exception for replies to one's own posts!)
Travis, this relates to ticket #30000 which I should be uploading code for today, so there is nothing to see there yet. The output to one function will be a pair, True/False and a dict, so this fits with what you said. What I will do is assign the two parts to variables and display each separately. I prefer that to the second suggestion, though that would certainly work too. John On Thursday, February 4, 2021 at 11:49:49 PM UTC hel...@potuz.net wrote: > In addition to that I've been using the idiom > > MyOutput == {this : dict} > True > > And that works for tests and renders well on documents > > R > > > On February 4, 2021 8:34:36 PM GMT-03:00, 'Travis Scrimshaw' via > sage-devel <sage-...@googlegroups.com> wrote: >> >> 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 >>> >> > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > -- 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/40bf307d-6f03-4090-8e02-40641be73d21n%40googlegroups.com.