From 8f83c3c7eae3bfc0dccf303ea6cc4c7e5daf6e2f Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 2 Dec 2016 19:49:39 +0100 Subject: [PATCH] Modify some test cases to prevent them from allocating too much --- mjtest/test/exec_tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mjtest/test/exec_tests.py b/mjtest/test/exec_tests.py index e8fcd56..6f50cec 100644 --- a/mjtest/test/exec_tests.py +++ b/mjtest/test/exec_tests.py @@ -153,7 +153,10 @@ class JavaExecTest(BasicSyntaxTest): def _check_hash_sum(self, file: str, hash_sum_file: str) -> bool: old_hash = "" with open(hash_sum_file, "r") as f: - old_hash = f.readline().strip() + try: + old_hash = f.readline().strip() + except UnicodeDecodeError: + _LOG.exception("Decoding a hash sum for java output caching failed") return self._hash_sum_for_file(file) == old_hash def _hash_sum_for_file(self, file: str) -> str: -- GitLab