Show More
@@ -36,6 +36,7 b' Authors' | |||
|
36 | 36 | |
|
37 | 37 | # Stdlib |
|
38 | 38 | import re |
|
39 | import sys | |
|
39 | 40 | import unittest |
|
40 | 41 | from doctest import DocTestFinder, DocTestRunner, TestResults |
|
41 | 42 | from IPython.terminal.interactiveshell import InteractiveShell |
@@ -49,7 +50,10 b' def count_failures(runner):' | |||
|
49 | 50 | |
|
50 | 51 | Code modeled after the summarize() method in doctest. |
|
51 | 52 | """ |
|
53 | if sys.version_info < (3, 13): | |
|
52 | 54 |
return [TestResults(f, t) for f, t in runner._name2ft.values() if f > 0 |
|
55 | else: | |
|
56 | return [TestResults(f, t) for f, t in runner._stats.values() if f > 0] | |
|
53 | 57 | |
|
54 | 58 | |
|
55 | 59 | class IPython2PythonConverter(object): |
General Comments 0
You need to be logged in to leave comments.
Login now