core
core copied to clipboard
ocrd_cli_wrap_processor: reference to sys.argv is wrong
trafficstars
https://github.com/OCR-D/core/blob/71d295ac1fccbeb4164e230bd584e1920b9ab3c8/ocrd/ocrd/decorators/init.py#L39-L41
This makes the CLI wrapper behave non-functionally. It usually still works (because click itself of course uses sys.argv), but fails with things like click.testing.CliRunner.
IMO the only correct way of testing for empty arguments is by checking all named kwargs for non-emptiness and then kwargs itself.