@@ -64,14 +64,19 @@ def test_default_settings(app, status, warning):
64
64
else :
65
65
cssclass = ""
66
66
67
+ if sphinx .version_info < (7 , 3 ):
68
+ alt = "Logo"
69
+ else :
70
+ alt = "Logo of Python"
71
+
67
72
chunks = [
68
73
'<h1>Page not found</h1>' ,
69
74
"Unfortunately we couldn't find the content you were looking for." ,
70
75
'<title>Page not found — Python documentation</title>' ,
71
76
72
77
# favicon and logo
73
78
f'<link rel="{ cssclass } icon" href="/en/latest/_static/favicon.png"/>' ,
74
- '<img class="logo" src="/en/latest/_static/logo.svg" alt="Logo "/>' ,
79
+ f '<img class="logo" src="/en/latest/_static/logo.svg" alt="{ alt } "/>' ,
75
80
76
81
# sidebar URLs
77
82
'<h1 class="logo"><a href="/en/latest/index.html">Python</a></h1>' ,
@@ -139,6 +144,11 @@ def test_urls_prefix_setting(app, status, warning):
139
144
else :
140
145
cssclass = ""
141
146
147
+ if sphinx .version_info < (7 , 3 ):
148
+ alt = "Logo"
149
+ else :
150
+ alt = "Logo of Python"
151
+
142
152
chunks = [
143
153
# sidebar URLs
144
154
'<h1 class="logo"><a href="/language/version/index.html">Python</a></h1>' ,
@@ -147,7 +157,7 @@ def test_urls_prefix_setting(app, status, warning):
147
157
148
158
# favicon and logo
149
159
f'<link rel="{ cssclass } icon" href="/language/version/_static/favicon.png"/>' ,
150
- '<img class="logo" src="/language/version/_static/logo.svg" alt="Logo "/>' ,
160
+ f '<img class="logo" src="/language/version/_static/logo.svg" alt="{ alt } "/>' ,
151
161
152
162
# resources
153
163
_get_css_html_link_tag (app , 'language' , 'version' , 'alabaster.css' ),
@@ -177,6 +187,12 @@ def test_urls_prefix_setting_none(app, status, warning):
177
187
else :
178
188
cssclass = ""
179
189
190
+ if sphinx .version_info < (7 , 3 ):
191
+ alt = "Logo"
192
+ else :
193
+ alt = "Logo of Python"
194
+
195
+
180
196
chunks = [
181
197
# sidebar URLs
182
198
'<h1 class="logo"><a href="/index.html">Python</a></h1>' ,
@@ -185,7 +201,7 @@ def test_urls_prefix_setting_none(app, status, warning):
185
201
186
202
# favicon and logo
187
203
f'<link rel="{ cssclass } icon" href="/_static/favicon.png"/>' ,
188
- '<img class="logo" src="/_static/logo.svg" alt="Logo "/>' ,
204
+ f '<img class="logo" src="/_static/logo.svg" alt="{ alt } "/>' ,
189
205
190
206
# resources
191
207
_get_css_html_link_tag (app , '' , '' , 'alabaster.css' ),
0 commit comments