-
Notifications
You must be signed in to change notification settings - Fork 0
Add unit tests for compute_layout() and print_human() #172
Copy link
Copy link
Open
Description
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 usingpytest. - 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels