From a09f6b8977477707b82fd2dabd832a25358b9934 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Thu, 27 Oct 2016 15:58:24 -0700 Subject: [PATCH] Test cases: check that stdout is clear of output To ensure piping to stdout is possible. --- tests/test_main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_main.py b/tests/test_main.py index 9539f350..9b653d1f 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -68,6 +68,9 @@ def check_ocrmypdf(input_basename, output_basename, *args, env=None): assert p.returncode == 0 assert os.path.exists(output_file), "Output file not created" assert os.stat(output_file).st_size > 100, "PDF too small or empty" + assert out == "", \ + "The following was written to stdout and should not have been: \n" + \ + "\n" + out + "\n" return output_file