Skip to content

Commit

Permalink
Fix test along with date -> datetime timezone assumption fix (#8823)
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle committed Feb 15, 2024
1 parent 42ec73d commit ef8cecf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_datetime.py
Expand Up @@ -628,9 +628,10 @@ class Model(BaseModel):
assert isinstance(now, datetime)


@pytest.mark.xfail(reason='waiting on pydantic-core 2.16.3')
def test_datetime_from_date_str():
class Model(BaseModel):
value: datetime

m = Model(value='2015-10-21')
assert m.value == datetime(2015, 10, 21, 0, 0, tzinfo=timezone.utc)
assert m.value == datetime(2015, 10, 21, 0, 0)

0 comments on commit ef8cecf

Please sign in to comment.