From d8829db810235c74fb76fce39aaa4e50a9893a1a Mon Sep 17 00:00:00 2001 From: Thomas Krennwallner Date: Mon, 5 Feb 2018 06:31:16 +0000 Subject: [PATCH] Fix testsuite for python3 when reading utf-8 scripts =================================================================== Gbp-Pq: Name gringo-python3-utf8.patch --- app/clingo/tests/run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/clingo/tests/run.py b/app/clingo/tests/run.py index 63032f5..7da85a1 100755 --- a/app/clingo/tests/run.py +++ b/app/clingo/tests/run.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import re import os @@ -133,7 +133,7 @@ if parse_ret.action == "run": for f in sorted(files): if f.endswith(".lp"): b = os.path.join(root, f[:-3]) - inst = open(b + ".lp", 'rU').read() + inst = open(b + ".lp", 'rU', encoding='utf-8').read() if (not with_python and re.search(r"#script[ ]*\(python\)", inst)) or \ (not with_lua and re.search(r"#script[ ]*\(lua\)", inst)) or \ (not with_threads and re.search("async=", inst)) or \ -- 2.30.2