Summary
The project currently has no automated tests. Since the core logic lives in compute_layout() and print_human(), adding a small test suite would increase confidence that the layout calculations remain correct as the script evolves.
Tasks
- Add a
tests/ folder using pytest.
- Test
compute_layout() for:
- basic cases (small leaves/arity)
- edge cases (leaves=1, arity=2, large values)
- padding correctness
- height calculation logic
- Test
print_human() by capturing stdout and verifying formatting.
- Add a simple GitHub Actions workflow to run tests on push/PR.
Benefit
Ensures core logic remains correct and prevents regression bugs.
Summary
The project currently has no automated tests. Since the core logic lives in
compute_layout()andprint_human(), adding a small test suite would increase confidence that the layout calculations remain correct as the script evolves.Tasks
tests/folder usingpytest.compute_layout()for:print_human()by capturing stdout and verifying formatting.Benefit
Ensures core logic remains correct and prevents regression bugs.