-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(polywrap-msgpack): enum serialization issue (#264)
- Loading branch information
1 parent
6a62193
commit 12d327a
Showing
5 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
from .basic_strategies import * | ||
from .class_strategies import * | ||
from .class_strategies import * | ||
from .enum_strategies import * | ||
from .generic_map_strategies import * |
14 changes: 14 additions & 0 deletions
14
packages/polywrap-msgpack/tests/strategies/enum_strategies.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from enum import IntEnum | ||
from hypothesis import strategies as st | ||
|
||
|
||
class TestEnum(IntEnum): | ||
Test0 = 0 | ||
Test1 = 1 | ||
Test2 = 2 | ||
Test3 = 3 | ||
|
||
|
||
def enum_st() -> st.SearchStrategy[IntEnum]: | ||
"""Define a strategy for generating valid `Enum`.""" | ||
return st.sampled_from(list(TestEnum)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters