This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Tomáš Petříček, jbakker, r.david.murray, rhettinger, serhiy.storchaka, tim.peters
Date 2017-11-19.18:25:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511115935.16.0.213398074469.issue32042@psf.upfronthosting.co.za>
In-reply-to
Content
I concur with Raymond. Doctest should test the representation, not value.

But I think it would be nice to support insignificant variations of the representation. Tracebacks already are treated specially, and different doctest options allow to ignore particular details. Of course ignoring the whole content of the dictionary will be not very useful.

   >>> dict_fun() # doctest: +ELLIPSIS
   {...}

But maybe some option should make accepting some permutations in the output. E.g.

   >>> dict_fun() # doctest: +PERMUTATION
   {<'foo': 1>, <'bar': 2>}

should accept both "{'foo': 1, 'bar': 2}" and "{'bar': 2, 'foo': 1}".
History
Date User Action Args
2017-11-19 18:25:35serhiy.storchakasetrecipients: + serhiy.storchaka, tim.peters, rhettinger, r.david.murray, jbakker, Tomáš Petříček
2017-11-19 18:25:35serhiy.storchakasetmessageid: <1511115935.16.0.213398074469.issue32042@psf.upfronthosting.co.za>
2017-11-19 18:25:35serhiy.storchakalinkissue32042 messages
2017-11-19 18:25:35serhiy.storchakacreate