Skip to content

Commit

Permalink
Do not make assertions about stdlib's doctest.py
Browse files Browse the repository at this point in the history
The source code in stdlib's doctest.py changed between Python 3.7 and
3.8 sufficiently to break even the cut down assertion we already have.

      {red}      File ".../lib/python3.8/doctest.py", Line NNN, in __run{normal}
    - {red}        compileflags, 1)...{normal}
    + {red}        exec(compile(example.source, filename, "single",{normal}

I get the feeling Python 3.8 points to the first line in a multiline
statement in tracebacks, whereas older Python versions usually pointed
to the last line.
  • Loading branch information
mgedmin committed Feb 12, 2019
1 parent ce9cd9d commit 3257517
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zope/testrunner/tests/testrunner-colors.rst
Expand Up @@ -89,7 +89,7 @@ A failed test run highlights the failures in red:
Exception raised:
{red} Traceback (most recent call last):{normal}
{red} File ".../doctest.py", line 1356, in __run{normal}
{red} compileflags, 1)...{normal}
{red} ...{normal}
{red} File "<doctest sample2.sampletests_e.eek[0]>", line 1, in ?{normal}
{red} f(){normal}
{red} File "testrunner-ex/sample2/sampletests_e.py", line 19, in f{normal}
Expand Down Expand Up @@ -127,7 +127,7 @@ A failed test run highlights the failures in red:
Exception raised:
{red} Traceback (most recent call last):{normal}
{red} File ".../doctest.py", line 1356, in __run{normal}
{red} compileflags, 1)...{normal}
{red} ...{normal}
{red} File "<doctest e.rst[1]>", line 1, in ?{normal}
{red} f(){normal}
{red} File "<doctest e.rst[0]>", line 2, in f{normal}
Expand Down

0 comments on commit 3257517

Please sign in to comment.