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

feat(datetime): Migrate standard datetime parsing to whenever library #394

Closed
wants to merge 7 commits into from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

This PR adds unit tests to verify that the datetime helper module correctly uses the 'whenever' parser for ISO/RFC compliant datetime values and falls back to dateutil.parser.parse for other formats.

Link to Devin run: https://app.devin.ai/sessions/2e37cc1080054be58292cfb5cf0551ff

Requested by: Aaron

Copy link
Contributor Author

🤖 Devin AI Engineer

Original prompt from Aaron:

In the CDK, create some unit tests that confirm a specific code path when parsing dates using our datetime helper module. Specifically, when parsing a datetime value that exactly conforms to the ISO/RFC specs, I expect the parsing will be done entirely with the `whenever` parser. And for other formats, I expect the parsing will fall back to datetime utils or another method.

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Comment on lines 349 to 350
def test_whenever_parser_for_iso_formats(monkeypatch):
"""Test that the whenever parser is used for certain formats even when dateutil is unavailable."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameterized test seems to cover these cases. Can we delete this test?

@devin-ai-integration devin-ai-integration bot changed the title tests: Add unit tests for datetime parser code paths (do not merge) feat(datetime): Migrate standard datetime parsing to whenever library Mar 7, 2025
@github-actions github-actions bot added the enhancement New feature or request label Mar 7, 2025
Copy link
Contributor Author

Closing due to inactivity for more than 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant