Fix UnicodeDecodeError
When generated Sphinx file is not in ascii, current code fails. Change-Id: Ie0c2fe56ee64710e81643ec58aec20dd6d7ec042
This commit is contained in:
parent
0cd27677a4
commit
99b9b75b83
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue