1
1
import doctest
2
+ from sys import version_info
2
3
3
4
try :
4
5
import matplotlib .pyplot as plt # noqa
@@ -57,7 +58,8 @@ def test_invalid_python_plus_skip(self):
57
58
lineno = 0 )
58
59
runner = DebugDTRunner ()
59
60
runner .run (test )
60
- assert runner .get_history () == {'none : +SKIP' : (0 , 0 )}
61
+ stats = (0 , 1 , 1 ) if version_info >= (3 , 13 ) else (0 , 0 )
62
+ assert runner .get_history () == {'none : +SKIP' : stats }
61
63
62
64
def test_invalid_python_pseudocode (self ):
63
65
# Marking a test as pseudocode is equivalent to a +SKIP:
@@ -74,7 +76,8 @@ def test_invalid_python_pseudocode(self):
74
76
lineno = 0 )
75
77
runner = DebugDTRunner ()
76
78
runner .run (test )
77
- assert runner .get_history () == {'none : pseudocode' : (0 , 0 )}
79
+ stats = (0 , 1 , 1 ) if version_info >= (3 , 13 ) else (0 , 0 )
80
+ assert runner .get_history () == {'none : pseudocode' : stats }
78
81
79
82
80
83
class TestPseudocodeMarkers :
@@ -125,7 +128,8 @@ def test_bogus_output(self):
125
128
runner .run (test )
126
129
127
130
# one example tried, of which zero failed
128
- assert runner .get_history () == {'stopwords_bogus_output' : (0 , 1 )}
131
+ stats = (0 , 1 , 0 ) if version_info >= (3 , 13 ) else (0 , 1 )
132
+ assert runner .get_history () == {'stopwords_bogus_output' : stats }
129
133
130
134
131
135
class TestMayVary :
@@ -148,7 +152,8 @@ def test_may_vary(self):
148
152
runner .run (test )
149
153
150
154
# one example tried, of which zero failed
151
- assert runner .get_history () == {'may_vary_markers' : (0 , 1 )}
155
+ stats = (0 , 1 , 0 ) if version_info >= (3 , 13 ) else (0 , 1 )
156
+ assert runner .get_history () == {'may_vary_markers' : stats }
152
157
153
158
def test_may_vary_source (self ):
154
159
# The marker needs to be added to the example output, not source.
@@ -164,7 +169,8 @@ def test_may_vary_source(self):
164
169
runner .run (test )
165
170
166
171
# one example tried, of which zero failed
167
- assert runner .get_history () == {'may_vary_source' : (0 , 1 )}
172
+ stats = (0 , 1 , 0 ) if version_info >= (3 , 13 ) else (0 , 1 )
173
+ assert runner .get_history () == {'may_vary_source' : stats }
168
174
169
175
def test_may_vary_syntax_error (self ):
170
176
# `# may vary` markers do not mask syntax errors, unlike `# doctest: +SKIP`
0 commit comments