We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db17f0c commit ce1e042Copy full SHA for ce1e042
tests/test_pickling.py
@@ -57,6 +57,11 @@ class Complex(betterproto.Message):
57
)
58
59
60
+class BetterprotoEnum(betterproto.Enum):
61
+ UNSPECIFIED = 0
62
+ ONE = 1
63
+
64
65
def complex_msg():
66
return Complex(
67
foo_str="yep",
@@ -201,3 +206,11 @@ def use_cache():
201
206
.string_value
202
207
== "world"
203
208
209
210
211
+def test_pickle_enum():
212
+ enum = BetterprotoEnum.ONE
213
+ assert unpickled(enum) == enum
214
215
+ enum = BetterprotoEnum.UNSPECIFIED
216
0 commit comments