From a2abfb430c37f85dbf31ed4674ef32e9972d522d Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Mon, 29 Sep 2014 00:53:49 +0100 Subject: [PATCH] Don't do a redundant idempotence check if it's the same as the output check we just did. Signed-off-by: Daira Hopwood --- tests/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index 18544e4..ed82bd3 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -36,6 +36,7 @@ def _check(this_input_content, which_check): (which_check, this_input_content, output_content, expected_content)) _check(input_content, "output check failed") - _check(expected_content, "idempotence check failed") + if input_content != expected_content: + _check(expected_content, "idempotence check failed") finally: shutil.rmtree(tmpdirname)