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

Allow datetime or str in test_sequential_control_messages #1219

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

ianthomas23
Copy link
Collaborator

Fixes #1218.

test_sequential_control_messages added in #1210 compares two datetimes returned in execute_reply messages. Some downstream libraries (ipyparallel) keep them as strings for performance reasons, so here allow this test to accept datetime or strings, otherwise this test is testing the return types rather than the intended sequence of control messages.

Once this passes CI here and is merged, we will need to check that IPythons CI also passes before we can be sure that it is fully fixed.

@ianthomas23
Copy link
Collaborator Author

Failures here are the same as in the last scheduled CI run https://github.com/ipython/ipykernel/actions/runs/8134006247

@ianthomas23 ianthomas23 added the bug label Mar 4, 2024
@blink1073
Copy link
Contributor

This failure on Windows looks relevant:

FAILED tests/test_kernel.py::test_sequential_control_messages - assert datetime.datetime(2024, 3, 4, 12, 12, 34, 411229, tzinfo=datetime.timezone.utc) > datetime.datetime(2024, 3, 4, 12, 12, 34, 411229, tzinfo=tzutc())

@ianthomas23
Copy link
Collaborator Author

Windows tests are passing now.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Thank you!

@blink1073 blink1073 merged commit cdc988a into ipython:main Mar 4, 2024
27 of 32 checks passed
@ianthomas23 ianthomas23 deleted the test_allow_str_or_datetime branch March 4, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: '>=' not supported between instances of 'str' and 'datetime.datetime'
2 participants