Enable --gen-onefile in Python (#6953)
authorlu-wang-g <47436172+lu-wang-g@users.noreply.github.com>
Thu, 9 Dec 2021 23:47:09 +0000 (15:47 -0800)
committerGitHub <noreply@github.com>
Thu, 9 Dec 2021 23:47:09 +0000 (15:47 -0800)
commit5fc87f4c4bf04228039c752003931d58a33e7a1b
tree3243b4baeee38dd3900ebdb339b5000d6ec13400
parent11749095a1e9a9e5296676fbc4b174faeb04765e
Enable --gen-onefile in Python (#6953)

* Enable --gen-onefile in Python

Made it possible to generate all python code in one file. Modified
py_test.py so that it can switch between the multi-file code and
the one-file code.

Updated PythonTest.sh and py_test.py so that the multi-file code
and the one-file code can be tested based on the same test code.

* Sync with google/flatbuffers

* Add --gen-onefile to generate_code.py
15 files changed:
docs/source/Compiler.md
scripts/generate_code.py
src/flatc.cpp
src/idl_gen_python.cpp
tests/MyGame/Example/Any.py
tests/MyGame/Example/AnyAmbiguousAliases.py
tests/MyGame/Example/AnyUniqueAliases.py
tests/MyGame/Example/Color.py
tests/MyGame/Example/Race.py
tests/MyGame/Example/TestEnum.py
tests/PythonTest.sh
tests/monster_test_generated.py [new file with mode: 0644]
tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.py
tests/namespace_test/NamespaceA/NamespaceB/UnionInNestedNS.py
tests/py_test.py