From: Mike Bayer Date: Tue, 24 Nov 2020 00:09:48 +0000 (-0500) Subject: ensure utf-8 used for opening tutorial files X-Git-Tag: rel_1_4_0b2~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4e40b35627f1c26b84234d16a36ce2850a798b9;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git ensure utf-8 used for opening tutorial files python 3.6 on CI seems to be using ascii encoding for some reason. Change-Id: Ic6881f28201eb2c186a0119dcd843a76f486971d --- diff --git a/test/base/test_tutorials.py b/test/base/test_tutorials.py index ea2c1e3620..14e87ef690 100644 --- a/test/base/test_tutorials.py +++ b/test/base/test_tutorials.py @@ -78,7 +78,7 @@ class DocTest(fixtures.TestBase): path = os.path.join(sqla_base, "doc/build", fname) if not os.path.exists(path): config.skip_test("Can't find documentation file %r" % path) - with open(path) as file_: + with open(path, encoding="utf-8") as file_: content = file_.read() content = re.sub(r"{(?:stop|sql|opensql)}", "", content)