By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,587 Members | 1,774 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,587 IT Pros & Developers. It's quick & easy.

Re: Testing dictionary results with doctest

P: n/a
Joe Strout:
What's the standard solution for this?
I don't know of any standard solution, I generally sort the items in
some ways, or add the result, that has to be equal:
>>r = foo()
r == {'object': 'rain', 'location': 'Spain', 'subloc': 'train'}

Does doctest have some special way to tell it to consider the result *
as a dictionary rather than a string? *Or something else?
A more general solution like this for sets/dics may become useful...
do you have any idea regarding how to design it?

Oct 31 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.