google / emboss

Emboss is a tool for generating code that reads and writes binary data structures.
Apache License 2.0
68 stars 21 forks source link

Fix header_generator_test #88

Closed jasongraffius closed 1 year ago

jasongraffius commented 1 year ago

Due to a missing unittest.main() call, the header_generator_test was not actually running any tests when run with bazel/run directly. However, the failure was noticed by python -m unittest discover. Fixed the header_generator_test in the following ways:

Additionally, this change adds a (blank) __init__.py to compiler/ and compiler/util/ so that they are importable by the unittest module. This means that running python -m unittest discover -p '*_test.py' from the main emboss repository should run all python tests in the compiler - and could be a good sanity check to make sure all python tests pass, even when bazel test compiler/... could miss tests (not declared in BUILD or missing the unittest.main() call).