diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-03 18:07:47 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-03 18:07:47 +0200 |
| commit | d44d62f5944c2765ba009197cc3ac5bb50d073e2 (patch) | |
| tree | 0d63be2ea8671ed50ffde99ad533a852444c47d8 /tests | |
| parent | 73fffe2e6f359b302b72b1f3740a08e471a31acc (diff) | |
| download | firefly-cli-d44d62f5944c2765ba009197cc3ac5bb50d073e2.tar.gz firefly-cli-d44d62f5944c2765ba009197cc3ac5bb50d073e2.zip | |
fix(budget): group help blurb, exact Decimal spent, resolver comment (v0.4.1)v0.4.1
Follow-ups from the v0.4.0 review:
- add the missing _GROUP_HELP blurb for the budget group (every other
group shows one) + a regression test asserting all groups have one.
- _spent_scalar sums with decimal.Decimal instead of float (exact money).
- note the numeric-name sniffing tradeoff in resolver.budget().
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_cli.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index 883f200..47e01cc 100644 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -24,3 +24,12 @@ class TestCli(unittest.TestCase): w.return_value = "/tmp/x" rc = cli.main(["auth", "set", "--url", "https://f", "--token", "t"]) self.assertEqual(rc, 0) + + def test_every_command_group_has_a_help_blurb(self): + # Every group shown in `firefly --help` should carry a _GROUP_HELP + # blurb; a new group added without one is easy to miss (budget did). + from firefly_cli import registry + import firefly_cli.commands # noqa: F401 ensure registration + groups = {c.name.split(" ", 1)[0] for c in registry.all_commands()} + missing = groups - set(cli._GROUP_HELP) + self.assertFalse(missing, f"groups without _GROUP_HELP: {missing}") |
