diff --git a/test/py/explicit_module/EnumSerializationTest.py b/test/py/explicit_module/EnumSerializationTest.py
new file mode 100644
index 0000000..8d82708
--- /dev/null
+++ b/test/py/explicit_module/EnumSerializationTest.py
@@ -0,0 +1,80 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from __future__ import annotations
+
+import sys
+from shared_types.ttypes import SharedEnum
+from thrift.TSerialization import serialize, deserialize
+from thrift.protocol import TBinaryProtocol
+from thrift.transport import TTransport
+
+def deserialize_immutable(base,
+                buf,
+                protocol_factory=TBinaryProtocol.TBinaryProtocolFactory()):
+    transport = TTransport.TMemoryBuffer(buf)
+    protocol = protocol_factory.getProtocol(transport)
+    return base.read(protocol)
+
+def serialization_deserialization_struct_enum_test():
+    test_obj = TestStruct(param1="test_string", param2=TestEnum.TestEnum1, param3=SharedEnum.SharedEnum1)
+    test_obj_serialized = serialize(test_obj)
+    test_obj2 = deserialize(TestStruct(), test_obj_serialized)
+    assert test_obj.param1 == test_obj2.param1
+    assert test_obj.param2 == test_obj2.param2
+    assert test_obj.param3 == test_obj2.param3
+
+def serialization_deserialization_struct_enum_as_string_test():
+    test_obj = TestStruct(param1="test_string", param2=TestEnum.TestEnum1.name, param3=SharedEnum.SharedEnum1.name)
+    test_obj_serialized = serialize(test_obj)
+    test_obj2 = deserialize(TestStruct(), test_obj_serialized)
+    assert test_obj.param1 == test_obj2.param1
+    assert test_obj.param2 == test_obj2.param2
+    assert test_obj.param3 == test_obj2.param3
+
+def serialization_deserialization_exception_enum_as_string_test():
+    test_obj = TestException(whatOp=0, why=SharedEnum.SharedEnum0.name, who=TestEnum.TestEnum0.name)
+    test_obj_serialized = serialize(test_obj)
+    test_obj2 = deserialize_immutable(TestException, test_obj_serialized)
+    assert test_obj.whatOp == test_obj2.whatOp
+    assert test_obj.why == test_obj2.why
+    assert test_obj.who == test_obj2.who
+
+def serialization_deserialization_exception_enum_test():
+    test_obj = TestException(whatOp=0, why=SharedEnum.SharedEnum0, who=TestEnum.TestEnum0)
+    test_obj_serialized = serialize(test_obj)
+    test_obj2 = deserialize_immutable(TestException, test_obj_serialized)
+    assert test_obj.whatOp == test_obj2.whatOp
+    assert test_obj.why == test_obj2.why
+    assert test_obj.who == test_obj2.who
+
+
+
+if __name__ == "__main__":
+    args = sys.argv[1:]
+    if args:
+        from test5_slots.test5.ttypes import TestEnum, TestStruct, TestException
+    else:
+        from test5.ttypes import TestEnum, TestStruct, TestException
+    serialization_deserialization_struct_enum_test()
+    serialization_deserialization_struct_enum_as_string_test()
+    serialization_deserialization_exception_enum_as_string_test()
+    serialization_deserialization_exception_enum_test()
\ No newline at end of file
diff --git a/test/py/explicit_module/runtest.sh b/test/py/explicit_module/runtest.sh
index 2445050..e4618b2 100755
--- a/test/py/explicit_module/runtest.sh
+++ b/test/py/explicit_module/runtest.sh
@@ -25,10 +25,15 @@
 ../../../compiler/cpp/thrift --gen py test3.thrift && exit 1  # Fail since test3.thrift has python keywords
 ../../../compiler/cpp/thrift --gen py:enum shared_types.thrift || exit 1
 ../../../compiler/cpp/thrift --gen py:enum test4.thrift || exit 1
+../../../compiler/cpp/thrift --gen py:enum test5.thrift || exit 1
+mkdir -p ./gen-py/test5_slots
+../../../compiler/cpp/thrift --gen py:enum,slots -out ./gen-py/test5_slots test5.thrift || exit 1
 PYTHONPATH=./gen-py python -c 'import foo.bar.baz' || exit 1
 PYTHONPATH=./gen-py python -c 'import test2' || exit 1
 PYTHONPATH=./gen-py python -c 'import test1' &>/dev/null && exit 1  # Should fail.
 PYTHONPATH=./gen-py python -c 'import test4.constants' || exit 1
+PYTHONPATH=./gen-py python EnumSerializationTest.py || exit 1
+PYTHONPATH=./gen-py python EnumSerializationTest.py slot|| exit 1
 cp -r gen-py simple
 ../../../compiler/cpp/thrift -r --gen py test2.thrift || exit 1
 PYTHONPATH=./gen-py python -c 'import test2' || exit 1
diff --git a/test/py/explicit_module/test5.thrift b/test/py/explicit_module/test5.thrift
new file mode 100644
index 0000000..f281424
--- /dev/null
+++ b/test/py/explicit_module/test5.thrift
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+namespace py test5
+
+include "shared_types.thrift"
+
+enum TestEnum {
+  TestEnum0 = 0,
+  TestEnum1 = 1,
+}
+
+struct TestStruct {
+    1: optional string param1
+    2: optional TestEnum param2
+    3: optional shared_types.SharedEnum param3
+}
+
+/**
+ * Structs can also be exceptions, if they are nasty.
+ */
+exception TestException {
+  1: i32 whatOp,
+  2: shared_types.SharedEnum why
+  3: TestEnum who
+}
\ No newline at end of file
