New submission from Sergey B Kirpichev <skirpic...@gmail.com>:

The Python stdlib allows override of sys.ps1/ps2 (to make IPython-like dynamic 
prompts and so on).  I believe it would be a good idea to
support this in doctest too, to cover cases when given application
uses different from defaults settings for the interpreter.

Probably, we could add ps1/2 optional arguments for DoctestParser.__init__().

Some projects already patch doctest module for this, e.g. IPython:
https://github.com/ipython/ipython/blob/master/IPython/testing/plugin/ipdoctest.py
It shouldn't be too hard to port this feature.

----------
components: Library (Lib)
messages: 312053
nosy: Sergey.Kirpichev
priority: normal
severity: normal
status: open
title: doctest should support custom ps1/ps2 prompts

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32832>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to