Repository navigation
Conversation
Compliance tests built expected datetime values with parse_rfc3339, so a bug in that helper and the parser could drift together. Build those expectations with stdlib fromisoformat instead, add a +05:30 offset case, and assert unwrap() values as well as types. Fixes python-poetry#603
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #603.
tests/test_toml_tests.pywas building expected datetime values withtomlkit._utils.parse_rfc3339, so a bug in that helper would also change the expected value. The compliance corpus is no longer an independent check for those four types.This PR:
date/time/datetime.fromisoformatinstead ofparse_rfc3339.+05:30case totest_parse_rfc3339_datetime(no existing test used a non-zero minute offset).elementary_testcompare the unwrapped value, not only its type.Verified locally:
1098 passed.Agent Drafting Metadata
pytest tests(1098 passed) plus a smoke check ofexpected_temporalfor date, time,Z, space-separated, and+05:30inputs.