cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-70280: allow using custom sys.displayhook's with doctest

Open skirpichev opened this issue 2 years ago • 0 comments

This partially reverts patch from https://bugs.python.org/issue8048

Now it's possible to test interactive examples in applications, which use cusomized sys.displayhook, e.g. SymPy, without nasty workarrounds (i.e. overriding the sys.__displayhook__ value before each tests).


This is a restored PR #25651 with minimal changes (internal for a doctest sys.displayhook changes now aren't leaked out).

  • Issue: gh-70280

:books: Documentation preview :books:: https://cpython-previews--111871.org.readthedocs.build/

skirpichev avatar Nov 09 '23 05:11 skirpichev