- Notifications
You must be signed in to change notification settings - Fork322
fix: timestamp precision in insert_rows#393
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
tswast left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please add a system test for this. It'll need to query the table that rows are inserted into in order to ensure the values roundtrip correctly.
Uh oh!
There was an error while loading.Please reload this page.
tswast commentedNov 19, 2020
As my explorations showed in#392 (comment), we can format the date using |
tests/unit/test__helpers.py Outdated
| when=datetime.datetime(2016,12,20,15,58,27,339328) | ||
| self.assertEqual(self._call_fut(when),_microseconds_from_datetime(when)/1e6) | ||
| self.assertEqual(self._call_fut(when),when.strftime(_RFC3339_MICROS)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please update these tests to compare against the actual string produced. I trust thatwhen.strftime(_RFC3339_MICROS) is doing the right thing, but I'd be much more comfortable seeing the actual formatted string here and in the other unit tests.
Fixes#392