Skip to content

Commit c3fe95a

Browse files
committed
Add test
1 parent e3d18cd commit c3fe95a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/test_preconf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,18 @@ def test_tomlkit_unions(union_and_val: tuple, detailed_validation: bool):
772772
assert converter.structure(val, type) == val
773773

774774

775+
def test_tomlkit_date_strings():
776+
"""Dates represented as strings in toml work."""
777+
converter = tomlkit_make_converter()
778+
779+
@define
780+
class A:
781+
a_date: date
782+
783+
data = 'a_date = "2023-01-01"'
784+
assert converter.loads(data, A) == A(date(2023, 1, 1))
785+
786+
775787
@given(everythings(min_int=-9223372036854775808, max_int=18446744073709551615))
776788
def test_cbor2(everything: Everything):
777789
from cbor2 import dumps as cbor2_dumps

0 commit comments

Comments
 (0)