[Python] Verify EnumDef is not generated in GenUnionCreator (#6903)

* [Python] Verify EnumDef is not generated in GenUnionCreator

* update test output
This commit is contained in:
Tom Miller
2021-11-04 17:21:31 -04:00
committed by GitHub
parent c0394bb09c
commit f8b69e3308
2 changed files with 6 additions and 0 deletions

View File

@@ -1595,6 +1595,8 @@ class PythonGenerator : public BaseGenerator {
// Creates an union object based on union type.
void GenUnionCreator(const EnumDef &enum_def, std::string *code_ptr) {
if (enum_def.generated) return;
auto &code = *code_ptr;
auto union_name = MakeUpperCamel(enum_def);