Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
Miauwkeru committed May 31, 2024
1 parent 0d440f9 commit 746c30c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/test_types_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,7 @@ def test_structure_definition_self(cs: cstruct) -> None:

def test_align_struct_in_struct(cs: cstruct) -> None:
with patch.object(StructureMetaType, "_update_fields") as update_fields:
fields = [Field("a", cs.uint64)]
cs._make_struct("test", fields, align=True)
args, kwargs = update_fields.call_args
new_kwargs = kwargs.copy()
new_kwargs.update({"align": True})
update_fields.assert_called_with(*args, **new_kwargs)
cs._make_struct("test", [Field("a", cs.uint64)], align=True)

_, kwargs = update_fields.call_args
assert kwargs["align"]

0 comments on commit 746c30c

Please sign in to comment.