Fix UnicodeDecodeError

When generated Sphinx file is not in ascii, current code fails.

Change-Id: Ie0c2fe56ee64710e81643ec58aec20dd6d7ec042
This commit is contained in:
Ondřej Nový 2017-10-31 22:13:42 +01:00
parent 0cd27677a4
commit 99b9b75b83
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ class TestBasicExample(base.TestCase):
self.status = status
self.warning = warning
self.app.build()
self.html = (app.outdir / 'index.html').read_text()
self.html = (app.outdir / 'index.html').read_text(encoding='utf-8')
self.soup = BeautifulSoup(self.html, 'html.parser')
self.content = str(self.soup)

View File

@ -38,7 +38,7 @@ class TestMicroversions(base.TestCase):
self.app.build()
self.status = status.getvalue()
self.warning = warning.getvalue()
self.html = (app.outdir / 'index.html').read_text()
self.html = (app.outdir / 'index.html').read_text(encoding='utf-8')
self.soup = BeautifulSoup(self.html, 'html.parser')
self.content = str(self.soup)

View File

@ -38,7 +38,7 @@ class TestWarnings(base.TestCase):
self.app.build()
self.status = status.getvalue()
self.warning = warning.getvalue()
self.html = (app.outdir / 'index.html').read_text()
self.html = (app.outdir / 'index.html').read_text(encoding='utf-8')
self.soup = BeautifulSoup(self.html, 'html.parser')
self.content = str(self.soup)