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

Fix pjson tests on newer Python versions #564

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ def iterable_strategy(draw, type_hint):
@composite
def os_stat_result_strategy(draw, _type_hint):
"""
os.stat_result instances can be generated as tuples of size 10. They most likely won't be valid
but it doesn't matter here.
os.stat_result instances can be generated as tuples of size 10.
"""
return draw(tuples(*[integer_strategy()] * 10))
return os.stat_result(draw(tuples(*[integer_strategy()] * 10)))


@composite
Expand Down Expand Up @@ -270,7 +269,7 @@ def test_interval_tree_serialization(obj: IntervalTree, _test_serialize_deserial
"json_obj,type_hint",
[
([1, 2], List),
({1: 2}, Dict),
([(1, 2)], Dict),
],
)
def test_from_pjson_ambiguous_type_hints(
Expand Down
Loading