Title: doctest should support custom ps1/ps2 prompts
Type: Stage:
Components: Library (Lib) Versions:
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Sergey.Kirpichev
Priority: normal Keywords:

Created on 2018-02-12 13:49 by Sergey.Kirpichev, last changed 2018-02-12 13:49 by Sergey.Kirpichev.

Messages (1)
msg312053 - (view) Author: Sergey B Kirpichev (Sergey.Kirpichev) Date: 2018-02-12 13:49
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:
It shouldn't be too hard to port this feature.
Date User Action Args
2018-02-12 13:49:39Sergey.Kirpichevcreate