Skip to content

Commit

Permalink
uprev speedate, prevent - sign as datetime (#1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Nov 6, 2023
1 parent d43d087 commit 1cf1c75
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -33,7 +33,7 @@ strum_macros = "0.25.3"
serde_json = {version = "1.0.108", features = ["arbitrary_precision", "preserve_order"]}
enum_dispatch = "0.3.8"
serde = { version = "1.0.190", features = ["derive"] }
speedate = "0.12.0"
speedate = "0.13.0"
smallvec = "1.11.1"
ahash = "0.8.6"
url = "2.4.1"
Expand Down
2 changes: 2 additions & 0 deletions tests/validators/test_date.py
Expand Up @@ -64,6 +64,8 @@
),
id='-inf',
),
pytest.param('-', Err('Input should be a valid date or datetime, input is too short'), id='minus'),
pytest.param('+', Err('Input should be a valid date or datetime, input is too short'), id='pus'),
],
)
def test_date(input_value, expected):
Expand Down
2 changes: 2 additions & 0 deletions tests/validators/test_datetime.py
Expand Up @@ -36,6 +36,8 @@
(float('nan'), Err('Input should be a valid datetime, NaN values not permitted [type=datetime_parsing,')),
(float('inf'), Err('Input should be a valid datetime, dates after 9999')),
(float('-inf'), Err('Input should be a valid datetime, dates before 1600')),
('-', Err('Input should be a valid datetime, input is too short [type=datetime_parsing,')),
('+', Err('Input should be a valid datetime, input is too short [type=datetime_parsing,')),
],
)
def test_datetime(input_value, expected):
Expand Down

0 comments on commit 1cf1c75

Please sign in to comment.