Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b1d9443

Browse files
authored
Merge pull request #6601 from matthew-brett/protect-against-locale
BF: protect against locale in sphinext text
2 parents 5151cf5 + 2b4d2dc commit b1d9443

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/sphinxext/tests/test_tinypages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ def plot_file(num):
8080
# Plot 13 shows close-figs in action
8181
assert_true(file_same(range_4, plot_file(13)))
8282
# Plot 14 has included source
83-
with open(pjoin(self.html_dir, 'some_plots.html'), 'rt') as fobj:
83+
with open(pjoin(self.html_dir, 'some_plots.html'), 'rb') as fobj:
8484
html_contents = fobj.read()
85-
assert_true('# Only a comment' in html_contents)
85+
assert_true(b'# Only a comment' in html_contents)
8686
# check plot defined in external file.
8787
assert_true(file_same(range_4, pjoin(self.html_dir, 'range4.png')))
8888
assert_true(file_same(range_6, pjoin(self.html_dir, 'range6.png')))
8989
# check if figure caption made it into html file
90-
assert_true('This is the caption for plot 15.' in html_contents)
90+
assert_true(b'This is the caption for plot 15.' in html_contents)

0 commit comments

Comments
 (0)