-
Notifications
You must be signed in to change notification settings - Fork 48
fix(#1058): add date serialization #1059
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| 2, | ||
| 3 | ||
| ], | ||
| "date": "2021-01-31", | ||
| "datetime": "2021-01-31T23:59:00.000000", | ||
| "float": 4.2, | ||
| "int": -1, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,10 +15,10 @@ def snapshot_json(snapshot): | |
| def test_matcher(snapshot_json): | ||
| content = { | ||
| "int": random.randint(1, 100), | ||
| "date": datetime.datetime.utcnow(), | ||
| "date": datetime.datetime.now(datetime.UTC), | ||
| "foo": { | ||
| "x": "y", | ||
| "another_date": datetime.datetime.utcnow(), | ||
| "another_date": datetime.datetime.now(datetime.UTC), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't supported by Python 3.10 which is the minimum version of Python we support. EOL is Oct 2026. If you wanted to write a test that uses the newer syntax, you would need to use a mark to conditionally run the test on >3.10
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ill adapt |
||
| }, | ||
| } | ||
| matcher = path_type( | ||
|
|
||
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.
You can take this out. It's going away once #1049 is merged, just haven't had the time to get back to it yet