For a detailed description of how each test suite is organized and how to write new tests, see TESTING.md.
- Java 21 — required to build the generator
- Maven — used to build and run JUnit tests
- Python 3.11+ — required to run Python unit and serialization tests
Clone the repository and change to the project root:
git clone https://github.com/finos/rune-python-generator
cd rune-python-generatorAll commands below are run from the project root unless stated otherwise.
mvn clean packageThe JUnit tests compare generated Python output against expected results. All tests should pass.
Assuming the build has completed successfully:
python-test/unit-tests/run_python_unit_tests.shAll tests should pass.
These tests implement the common serialization standards from the Rune Common Repo.
Step 1 — Fetch the Rune source and JSON test fixtures:
python-test/serialization-tests/get_serialization_source.shStep 2 — Generate Python from the Rune definitions:
mvn clean packageStep 3 — Run the tests:
python-test/serialization-tests/run_serialization_tests.shAll tests are expected to pass.
serialization_test.py can run against a directory of JSON files or a single file.
Step 1 — Set up the Python environment:
python-test/env-setup/setup_python_env.sh
source .pyenv/bin/activateStep 2 — Show usage help:
python python-test/serialization-tests/serialization_test.py -hStep 3 — When finished, deactivate and clean up the environment:
deactivate
python-test/env-setup/cleanup_python_env.sh