Commit graph

11 commits

Author SHA1 Message Date
e960f56b93
test: Add simple happypath annotation adding
Some checks are pending
website / build (push) Waiting to run
website / deploy (push) Blocked by required conditions
2025-11-29 18:52:44 +01:00
3ef552bbe5
ref: Print optional error message on editor process error
Editor function takes an optional io object which is used to print an
error output if the subprocess errors.
2025-11-29 18:52:44 +01:00
e84adc4392
fix: Correct whitespace separation on editor shell call
Switch to using 'sequence'-delineated arguments given to the subprocess
run call to correctly handle whitespace.
Also check the output, so we exit if we have an error.
Test accordingly.
2025-11-29 18:52:43 +01:00
13c34b08e2
test: Restructure test files
Some checks are pending
website / deploy (push) Blocked by required conditions
website / build (push) Waiting to run
Extract the individual parsing tests (cli, env, rc) and add additional
configuration test file (TConf and config builder).

To extract the fixtures they have to go into an additional 'conftest.py'
file for pytest to recognize and automatically import them, see:
https://docs.pytest.org/en/stable/reference/fixtures.html#conftest-py-sharing-fixtures-across-multiple-files

and:
https://docs.pytest.org/en/stable/how-to/fixtures.html#using-fixtures-from-other-projects
2025-11-29 12:29:35 +01:00
ff0e6cccfb
fix: Correctly parse boolean config options set to false
Previously, when parsing config options that were set to 'false',
e.g. `TOPEN_NOTES_QUIET=false` in the env vars,
we would still be setting it to true.

This change fixes any falsy value to be correctly parsed as False.
2025-11-29 12:29:34 +01:00
46135f9325
test: Correctly fall back to EDITOR or VISUAL env vars 2025-11-28 23:08:18 +01:00
620a7bc401
test: Add TConf class tests 2025-11-28 23:08:18 +01:00
cb5e38b503
test: Add rc config file test 2025-11-28 23:08:17 +01:00
97478d62d1
test: Add tests for environment option setting 2025-11-28 23:08:17 +01:00
ee8fef930a
test: Fix correct cli option value casting
Since we can set the type of the relevant option in the OPTIONS dict, we
should also let the cli correctly cast them on parsing, just as the env
options do.
2025-11-28 23:08:16 +01:00
bd05dadf56
test: Add simple pytest harness 2025-11-28 23:08:16 +01:00