Am 2014-07-31 um 15:55 schrieb Volker Braun: > On Thursday, July 31, 2014 9:16:50 AM UTC-4, Daniel Krenn wrote: > > Does this mean it is guaranteed that in doctests dicts are always shown > with their keys sorted? > > > AFAIK: Yes, but only the top-level dict (no guarantees for nested > datastructures)
The lines sage: d = {'a':23, 'b':34, 'au':56, 'bbf':234, 'aaa':234} sage: d {'a': 23, 'aaa': 234, 'au': 56, 'b': 34, 'bbf': 234} are the command line output. Doing this in a doctest (called by a simple Makefile) gives (among one other failing test): sage -t test-order.sage Running doctests with ID 2014-07-31-16-40-03-3683866f. Doctesting 1 file. sage -t test-order.sage ********************************************************************** File "test-order.sage", line 8, in test-order Failed example: d Expected: {'a': 23, 'aaa': 234, 'au': 56, 'b': 34, 'bbf': 234} Got: {'a': 23, 'bbf': 234, 'aaa': 234, 'b': 34, 'au': 56} ********************************************************************** 1 item had failures: 2 of 5 in test-order [4 tests, 2 failures, 0.00 s] ---------------------------------------------------------------------- sage -t test-order.sage # 2 doctests failed ---------------------------------------------------------------------- Total time for all tests: 0.0 seconds cpu time: 0.0 seconds cumulative wall time: 0.0 seconds make: *** [doctest] Fehler 1 This does not look like it would use the display hook... Daniel -- 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 post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.