File: FTBS_UnicodeDecodeError.patch

package info (click to toggle)
python-os-api-ref 1.5.0%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 404 kB
  • sloc: python: 925; makefile: 8
file content (37 lines) | stat: -rw-r--r-- 1,471 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Description: Fix UnicodeDecodeError
Author: Ondřej Nový <onovy@debian.org>
Forwarded: https://review.openstack.org/#/c/516788

--- a/os_api_ref/tests/test_basic_example.py
+++ b/os_api_ref/tests/test_basic_example.py
@@ -38,7 +38,7 @@
         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)
 
--- a/os_api_ref/tests/test_microversions.py
+++ b/os_api_ref/tests/test_microversions.py
@@ -38,7 +38,7 @@
         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)
 
--- a/os_api_ref/tests/test_warnings.py
+++ b/os_api_ref/tests/test_warnings.py
@@ -38,7 +38,7 @@
         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)