[New-bugs-announce] [issue32832] doctest should support custom ps1/ps2 prompts

Sergey B Kirpichev report at bugs.python.org
Mon Feb 12 08:49:39 EST 2018


New submission from Sergey B Kirpichev <skirpichev at 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 <report at bugs.python.org>
<https://bugs.python.org/issue32832>
_______________________________________


More information about the New-bugs-announce mailing list