Skip to content

Commit

Permalink
Remove unnecessary conversion of str to datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthomas23 committed Feb 15, 2024
1 parent 2bc9717 commit fc298e4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/test_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,7 @@ def test_sequential_control_messages():
previous_end = None
for reply, sleep in zip(replies, sleeps):
start = datetime.fromisoformat(reply["metadata"]["started"])
end = reply["header"]["date"]
if isinstance(end, str):
end = datetime.fromisoformat(end)
end = reply["header"]["date"] # Already a datetime

if previous_end is not None:
assert start > previous_end
Expand Down

0 comments on commit fc298e4

Please sign in to comment.