Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2b4d2dc

Browse filesBrowse files
committed
BF: protect against locale in sphinext text
The sphinxext tests were loading a text file with encoding not stated, making the test sensitive to the default locale of the testing machine. See: https://travis-ci.org/matthew-brett/matplotlib-wheels/jobs/138518917#L8787 Read the text file as binary to avoid need for encoding.
1 parent 6b1adfd commit 2b4d2dc
Copy full SHA for 2b4d2dc

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎lib/matplotlib/sphinxext/tests/test_tinypages.py

Copy file name to clipboardExpand all lines: lib/matplotlib/sphinxext/tests/test_tinypages.py
+3-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.