@@ -312,51 +312,51 @@ def test_edtf_examples(test_input, expected_tuple):
312312
313313 # Unpack expected results based on their count
314314 if len (expected_tuple ) == 1 :
315- assert (
316- result_date == expected_tuple [0 ]
317- ), f"Expected { expected_tuple [ 0 ] } , got { result_date } "
315+ assert result_date == expected_tuple [ 0 ], (
316+ f"Expected { expected_tuple [0 ]} , got { result_date } "
317+ )
318318 elif len (expected_tuple ) == 2 :
319319 lower_strict = iso_to_struct_time (expected_tuple [0 ])
320320 upper_strict = iso_to_struct_time (expected_tuple [1 ])
321- assert (
322- result . lower_strict () == lower_strict
323- ), f"Lower strict date does not match. Expected { lower_strict } , got { result . lower_strict () } "
324- assert (
325- result . upper_strict () == upper_strict
326- ), f"Upper strict date does not match. Expected { upper_strict } , got { result . upper_strict () } "
321+ assert result . lower_strict () == lower_strict , (
322+ f"Lower strict date does not match. Expected { lower_strict } , got { result . lower_strict () } "
323+ )
324+ assert result . upper_strict () == upper_strict , (
325+ f"Upper strict date does not match. Expected { upper_strict } , got { result . upper_strict () } "
326+ )
327327 elif len (expected_tuple ) == 3 :
328328 strict_date = iso_to_struct_time (expected_tuple [0 ])
329329 lower_fuzzy = iso_to_struct_time (expected_tuple [1 ])
330330 upper_fuzzy = iso_to_struct_time (expected_tuple [2 ])
331- assert (
332- result .lower_strict () == strict_date
333- ), f"Lower strict date does not match. Expected { strict_date } , got { result . lower_strict () } "
334- assert (
335- result .upper_strict () == strict_date
336- ), f"Upper strict date does not match. Expected { strict_date } , got { result . upper_strict () } "
337- assert (
338- result . lower_fuzzy () == lower_fuzzy
339- ), f"Lower fuzzy date does not match. Expected { lower_fuzzy } , got { result . lower_fuzzy () } "
340- assert (
341- result . upper_fuzzy () == upper_fuzzy
342- ), f"Upper fuzzy date does not match. Expected { upper_fuzzy } , got { result . upper_fuzzy () } "
331+ assert result . lower_strict () == strict_date , (
332+ f"Lower strict date does not match. Expected { strict_date } , got { result .lower_strict ()} "
333+ )
334+ assert result . upper_strict () == strict_date , (
335+ f"Upper strict date does not match. Expected { strict_date } , got { result .upper_strict ()} "
336+ )
337+ assert result . lower_fuzzy () == lower_fuzzy , (
338+ f"Lower fuzzy date does not match. Expected { lower_fuzzy } , got { result . lower_fuzzy () } "
339+ )
340+ assert result . upper_fuzzy () == upper_fuzzy , (
341+ f"Upper fuzzy date does not match. Expected { upper_fuzzy } , got { result . upper_fuzzy () } "
342+ )
343343 elif len (expected_tuple ) == 4 :
344344 lower_strict = iso_to_struct_time (expected_tuple [0 ])
345345 upper_strict = iso_to_struct_time (expected_tuple [1 ])
346346 lower_fuzzy = iso_to_struct_time (expected_tuple [2 ])
347347 upper_fuzzy = iso_to_struct_time (expected_tuple [3 ])
348- assert (
349- result . lower_strict () == lower_strict
350- ), f"Lower strict date does not match. Expected { lower_strict } , got { result . lower_strict () } "
351- assert (
352- result . upper_strict () == upper_strict
353- ), f"Upper strict date does not match. Expected { upper_strict } , got { result . upper_strict () } "
354- assert (
355- result . lower_fuzzy () == lower_fuzzy
356- ), f"Lower fuzzy date does not match. Expected { lower_fuzzy } , got { result . lower_fuzzy () } "
357- assert (
358- result . upper_fuzzy () == upper_fuzzy
359- ), f"Upper fuzzy date does not match. Expected { upper_fuzzy } , got { result . upper_fuzzy () } "
348+ assert result . lower_strict () == lower_strict , (
349+ f"Lower strict date does not match. Expected { lower_strict } , got { result . lower_strict () } "
350+ )
351+ assert result . upper_strict () == upper_strict , (
352+ f"Upper strict date does not match. Expected { upper_strict } , got { result . upper_strict () } "
353+ )
354+ assert result . lower_fuzzy () == lower_fuzzy , (
355+ f"Lower fuzzy date does not match. Expected { lower_fuzzy } , got { result . lower_fuzzy () } "
356+ )
357+ assert result . upper_fuzzy () == upper_fuzzy , (
358+ f"Upper fuzzy date does not match. Expected { upper_fuzzy } , got { result . upper_fuzzy () } "
359+ )
360360
361361
362362@pytest .mark .parametrize ("bad_input" , BAD_EXAMPLES )
0 commit comments