@@ -200,7 +200,7 @@ def validate_build(testproject_path, plugin_config: dict = {}):
200200 fallback_to_build_date = plugin_config .get ("fallback_to_build_date" ),
201201 )
202202
203- searches = [re . search ( x , contents ) for x in date_formats .values ()]
203+ searches = [x in contents for x in date_formats .values ()]
204204 assert any (searches ), "No correct date formats output was found"
205205
206206
@@ -240,7 +240,7 @@ def test_date_formats():
240240 "datetime" : "February 22, 2020 18:52:09" ,
241241 "iso_date" : "2020-02-22" ,
242242 "iso_datetime" : "2020-02-22 18:52:09" ,
243- "timeago" : " <span class=' timeago' datetime=' 2020-02-22T18:52:09+00:00' locale='en' ></span>" ,
243+ "timeago" : ' <span class=" timeago" datetime=" 2020-02-22T18:52:09+00:00" locale="en" ></span>' ,
244244 }
245245
246246
@@ -301,7 +301,7 @@ def test_build_material_theme(tmp_path):
301301 # in German because locale is set to 'de'
302302 index_file = testproject_path / "site/index.html"
303303 contents = index_file .read_text (encoding = "utf8" )
304- assert re .search (r"Letztes Update\:\s[\w ].+" , contents )
304+ assert re .search (r"Letztes Update\:\s[<span class ].+" , contents )
305305
306306
307307def test_material_theme_locale (tmp_path ):
@@ -318,7 +318,7 @@ def test_material_theme_locale(tmp_path):
318318 # The date will be in german though
319319 index_file = testproject_path / "site/index.html"
320320 contents = index_file .read_text (encoding = "utf8" )
321- assert re .search (r"Last update\:\s[\w ].+" , contents )
321+ assert re .search (r"Last update\:\s[<span class ].+" , contents )
322322
323323
324324def test_material_theme_no_locale (tmp_path ):
@@ -334,7 +334,7 @@ def test_material_theme_no_locale(tmp_path):
334334 # in German because locale is set to 'de'
335335 index_file = testproject_path / "site/index.html"
336336 contents = index_file .read_text (encoding = "utf8" )
337- assert re .search (r"Last update\:\s[\w ].+" , contents )
337+ assert re .search (r"Last update\:\s[<span class ].+" , contents )
338338
339339
340340def test_type_timeago (tmp_path ):
0 commit comments