]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
ensure utf-8 used for opening tutorial files
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Nov 2020 00:09:48 +0000 (19:09 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Nov 2020 00:09:48 +0000 (19:09 -0500)
python 3.6 on CI seems to be using ascii encoding for some reason.

Change-Id: Ic6881f28201eb2c186a0119dcd843a76f486971d

test/base/test_tutorials.py

index ea2c1e3620f83233e419bf6215699f5eb58d6aa0..14e87ef6900b867fc19cfdf5e35fd6b5eb1a1da2 100644 (file)
@@ -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)