File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
+ import sys
4
+ import warnings
3
5
from pathlib import Path
4
6
5
7
import pytest
13
15
else :
14
16
mpl .rcParams ['figure.max_open_warning' ] = 0
15
17
18
+ if sys .version_info [:2 ] >= (3 , 10 ):
19
+ warnings .filterwarnings (
20
+ 'ignore' ,
21
+ category = EncodingWarning , # NoQA: F821
22
+ module = 'matplotlib.font_manager' ,
23
+ )
24
+
25
+
16
26
pytest_plugins = ['sphinx.testing.fixtures' ]
17
27
18
28
@@ -34,9 +44,9 @@ def content(app):
34
44
35
45
def _meta_tags (content , subdir = None ):
36
46
if subdir is None :
37
- c = (content .outdir / 'index.html' ).read_text ()
47
+ c = (content .outdir / 'index.html' ).read_text (encoding = 'utf-8' )
38
48
else :
39
- c = (content .outdir / subdir / 'index.html' ).read_text ()
49
+ c = (content .outdir / subdir / 'index.html' ).read_text (encoding = 'utf-8' )
40
50
return BeautifulSoup (c , 'html.parser' ).find_all ('meta' )
41
51
42
52
You can’t perform that action at this time.
0 commit comments