Coding 2022-09-23
Ugh, I didn't get things done with the Lox code today, so instead, how about I try to refresh my memory about MOTR's code on the way into the weekend?
Okay, I've got thirteen files that need to have improved coverage:
- motr._api.cli.build: Missing some failure paths that it's going to take either a rewrite, or some "interesting" mocking to hit...
- motr._api.cli_types.command: I think this was involved in all of the renames I wanted to do. There are several paths missing. Resolving Executable values as environment variables and extra IO, and some unimplemented paths that look obvious from context... There's also a helper function that needs to be either deleted or renamed.
- motr._api.cli_types.command_builder: Missing error case, and extending an OptionBuilder, which seems like a sensible thing to do, I think...
- motr._api.cli_types.flex: Missing unprefixed parent argument, protocol methods on some of the classes, FlexOut with no parent.
- motr._api.cli_types.input_accumulator: Missing some validation code.
- motr._api.cli_types.installer: Missing some validation failures.
- motr._api.cli_types.not_output: These functions are validation helpers, and just need to exercise some failure and happy paths. Some of the names should be updated as well, which should have mercifully little fallout.
- motr._api.cli_types.parametric: This is one of the major support modules for the new system. It's mostly missing coverage on its validation paths, but it's also got partial coverage on a block that I'll need to think about how to address...
- motr._api.cli_types.parametric_command: Needs to use one of the helper classes it defines, and it's missing an error path.
- motr._api.helpers.python_helpers: Missing coverage on a helper method and a helper function. Hopefully it's not too hard to determine when they'd merit usage.
- motr._api.installers.pip: This module is pulling double duty and should be pulled apart, but in any case, it's mostly missing validation, and the usage of a Python version specified as a string.
- motr.validators: A validation helper that needs to raise a validation failure, have its documentation retrieved when the decorated function is documented, and when it is not documented.
Outside of the main source tree, there's also some Mypy plugin code missing a branch that I'll need to know Mypy better to know if I should write a test or convert it to an assertion.
Aside from the plugin code, I could probably get okay results just writing tests for the files in ascending order of absolute coverage misses. I just need some order to work through this stuff, that makes enough sense that I don't second-guess myself.
Anyway, it's late, and I want to wrap up.
Good night.