Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test logic for datetime #2900

Merged
merged 2 commits into from
Aug 31, 2024
Merged

Conversation

ageorgou
Copy link
Contributor

Summary of changes

One of the assertions in test_datetime_z seems to be performing operations in the wrong order. This also means it's passing trivially, as it's essentially recreating the expected result string and asserting it's not empty.

This PR changes the test to what I think was the intended order of operations:

  • format the parsed datetime value (l.toPython()) according to the given format string
  • compare against the expected result string
  • assert they're equal

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Checked that all tests and type checking passes.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@coveralls
Copy link

coveralls commented Aug 31, 2024

Coverage Status

coverage: 90.637%. remained the same
when pulling a152494 on ageorgou:fix-date-test
into 2f2cf94 on RDFLib:main.

@ashleysommer ashleysommer merged commit 0a0d4b6 into RDFLib:main Aug 31, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants