@@ -126,6 +126,23 @@ def test_pt_html(self):
126126NameError: name 'a' is not defined
127127</pre></td></tr>
128128</table>
129+ <p> </p>"""
130+
131+ expected3_11 = """<h1>Templating Error</h1>
132+ <p><b><class 'NameError'></b>: name 'a' is not defined</p>
133+ <p class="help">Debugging information follows</p>
134+ <ol>
135+
136+ </ol>
137+ <table style="font-size: 80%; color: gray">
138+ <tr><th class="header" align="left">Full traceback:</th></tr>
139+ <tr><td><pre>Traceback (most recent call last):
140+ File "XX/test/test_misc.py", line XX, in test_pt_html
141+ d = a + 4
142+ ^
143+ NameError: name 'a' is not defined
144+ </pre></td></tr>
145+ </table>
129146<p> </p>"""
130147
131148 # allow file directory prefix and line number to change
@@ -134,15 +151,17 @@ def test_pt_html(self):
134151
135152 print (p )
136153
137- if sys .version_info > (3 , 0 , 0 ):
154+ if sys .version_info > (3 , 11 , 0 ):
155+ self .assertEqual (expected3_11 , p )
156+ elif sys .version_info > (3 , 0 , 0 ):
138157 self .assertEqual (expected3 , p )
139158 else :
140159 self .assertEqual (expected2 , p )
141160
142161 def notest_html (self ):
143162 """ templating error """
144163 # enabiling this will cause the test to fail as the variable
145- # is included in the live outpu but not in expected.
164+ # is included in the live output but not in expected.
146165 # self.maxDiff = None
147166
148167 try :
0 commit comments