aboutsummaryrefslogtreecommitdiff
path: root/tests/python_generator_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/python_generator_test.py')
-rw-r--r--tests/python_generator_test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/python_generator_test.py b/tests/python_generator_test.py
index fdd04a8..a126c8d 100644
--- a/tests/python_generator_test.py
+++ b/tests/python_generator_test.py
@@ -63,7 +63,7 @@ def create_object(typ, value):
elif typing_extensions.get_origin(typ) is typing.Union:
# typing.Optional[int] expands to typing.Union[int, None]
typ = typing_extensions.get_args(typ)[0]
- return create_object(typ, value) if value else None
+ return create_object(typ, value) if value is not None else None
elif typ is bytes:
return bytes(value)
elif typ is bytearray: