Compare commits
4 Commits
4851a0a0c3
...
v1.47.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
c01bee1f0c
|
|||
| b5dd5a0e46 | |||
| fa4bbee815 | |||
| 859383935c |
@@ -1,4 +1,4 @@
|
|||||||
FROM python:3.13.9-slim
|
FROM python:3.13.12-slim
|
||||||
LABEL maintainer="Luke Tainton <luke@tainton.uk>"
|
LABEL maintainer="Luke Tainton <luke@tainton.uk>"
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,11 @@ def test_correct() -> None:
|
|||||||
|
|
||||||
def test_invalid() -> None:
|
def test_invalid() -> None:
|
||||||
"""Test timestamp_to_date() with an invalid timestamp."""
|
"""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"
|
timestamp: str = "hello"
|
||||||
with pytest.raises(TypeError) as excinfo:
|
with pytest.raises(TypeError) as excinfo:
|
||||||
timestamp_to_date(timestamp)
|
timestamp_to_date(timestamp)
|
||||||
assert "'str' object cannot be interpreted as an integer" in str(excinfo.value)
|
assert str(excinfo.value) in allowed_errors
|
||||||
|
|||||||
Reference in New Issue
Block a user