tests: fix interpretation of None as omitted argument

This commit is contained in:
James R. Barlow
2019-08-11 16:58:22 -07:00
parent 793348a47c
commit 7755c5c5a7
+2 -3
View File
@@ -176,10 +176,9 @@ def no_outpdf(tmp_path):
def check_ocrmypdf(input_file, output_file, *args, env=None):
"""Run ocrmypdf and confirmed that a valid file was created"""
# p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
options = cli.parser.parse_args(
[str(input_file), str(output_file)] + [str(arg) for arg in args]
[str(input_file), str(output_file)]
+ [str(arg) for arg in args if arg is not None]
)
api.check_options(options)
if env: