Add if...else... switch to doctest?

David zhushenli at gmail.com
Thu Oct 18 20:08:37 EDT 2012


Hello, how to add if...else... switch to doctest?
E.g. function outputs different value when global_var change.

"""
if (global_var == True):
>>> function()
[1,2]
else:
>>> function()
[1,2,3]
"""

Thank you very much.



More information about the Python-list mailing list