Skip to content

Commit

Permalink
One more test to demonstrate how it works
Browse files Browse the repository at this point in the history
  • Loading branch information
Pliner committed Nov 11, 2024
1 parent 1f132a5 commit 5c05cb3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@
import marshmallow_recipe as mr


def test_order():
def test_order_1():
@dataclasses.dataclass
class A:
a: int
b: int

assert [name for name in mr.dump(A(a=1, b=2))] == ["a", "b"]


def test_order_2():
@dataclasses.dataclass
class A:
b: int
a: int

assert [name for name in mr.dump(A(b=1, a=2))] == ["b", "a"]

0 comments on commit 5c05cb3

Please sign in to comment.