From 859383935ca92ec108794958762e09b97f9315dd Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 28 Feb 2026 14:16:30 +0000 Subject: [PATCH] fix(test): fix assertion error in timestamp_to_date invalid test (#421) Reviewed-on: https://git.tainton.uk/repos/roboluke/pulls/421 --- tests/test_datetime.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_datetime.py b/tests/test_datetime.py index 8da21d1..08b3721 100644 --- a/tests/test_datetime.py +++ b/tests/test_datetime.py @@ -16,7 +16,11 @@ def test_correct() -> None: def test_invalid() -> None: """Test timestamp_to_date() with an invalid timestamp.""" + allowed_errors: list[str] = [ + "'str' object cannot be interpreted as an integer", + "argument must be int or float, not str" + ] timestamp: str = "hello" with pytest.raises(TypeError) as excinfo: timestamp_to_date(timestamp) - assert "'str' object cannot be interpreted as an integer" in str(excinfo.value) + assert str(excinfo.value) in allowed_errors