File tree 5 files changed +36
-17
lines changed
5 files changed +36
-17
lines changed Original file line number Diff line number Diff line change 2
2
import os
3
3
import sys
4
4
import tempfile
5
+ import warnings
5
6
6
7
import numpy as np
7
8
import pytest
14
15
_determinism_check )
15
16
16
17
17
- needs_usetex = pytest .mark .skipif (
18
- not checkdep_usetex (True ),
19
- reason = "This test needs a TeX installation" )
18
+ with warnings .catch_warnings ():
19
+ warnings .simplefilter ('ignore' )
20
+ needs_usetex = pytest .mark .skipif (
21
+ not checkdep_usetex (True ),
22
+ reason = "This test needs a TeX installation" )
20
23
21
24
22
25
@image_comparison (baseline_images = ['pdf_use14corefonts' ],
Original file line number Diff line number Diff line change 3
3
from pathlib import Path
4
4
import re
5
5
import tempfile
6
+ import warnings
6
7
7
8
import pytest
8
9
14
15
_determinism_check )
15
16
16
17
17
- needs_ghostscript = pytest .mark .skipif (
18
- matplotlib .checkdep_ghostscript ()[0 ] is None ,
19
- reason = "This test needs a ghostscript installation" )
20
- needs_usetex = pytest .mark .skipif (
21
- not matplotlib .checkdep_usetex (True ),
22
- reason = "This test needs a TeX installation" )
18
+ with warnings .catch_warnings ():
19
+ warnings .simplefilter ('ignore' )
20
+ needs_ghostscript = pytest .mark .skipif (
21
+ matplotlib .checkdep_ghostscript ()[0 ] is None ,
22
+ reason = "This test needs a ghostscript installation" )
23
+ needs_usetex = pytest .mark .skipif (
24
+ not matplotlib .checkdep_usetex (True ),
25
+ reason = "This test needs a TeX installation" )
23
26
24
27
25
28
# This tests tends to hit a TeX cache lock on AppVeyor.
Original file line number Diff line number Diff line change 2
2
from io import BytesIO
3
3
import os
4
4
import tempfile
5
+ import warnings
5
6
import xml .parsers .expat
6
7
7
8
import pytest
12
13
from matplotlib import dviread
13
14
14
15
15
- needs_usetex = pytest .mark .skipif (
16
- not matplotlib .checkdep_usetex (True ),
17
- reason = "This test needs a TeX installation" )
16
+ with warnings .catch_warnings ():
17
+ warnings .simplefilter ('ignore' )
18
+ needs_usetex = pytest .mark .skipif (
19
+ not matplotlib .checkdep_usetex (True ),
20
+ reason = "This test needs a TeX installation" )
18
21
19
22
20
23
def test_visibility ():
Original file line number Diff line number Diff line change 11
11
from matplotlib .testing .decorators import image_comparison
12
12
13
13
14
- needs_usetex = pytest .mark .skipif (
15
- not matplotlib .checkdep_usetex (True ),
16
- reason = "This test needs a TeX installation" )
14
+ with warnings .catch_warnings ():
15
+ warnings .simplefilter ('ignore' )
16
+ needs_usetex = pytest .mark .skipif (
17
+ not matplotlib .checkdep_usetex (True ),
18
+ reason = "This test needs a TeX installation" )
17
19
18
20
19
21
@image_comparison (baseline_images = ['font_styles' ])
Original file line number Diff line number Diff line change
1
+ import warnings
2
+
1
3
import pytest
2
4
3
5
import matplotlib
4
6
from matplotlib .testing .decorators import image_comparison
5
7
import matplotlib .pyplot as plt
6
8
7
9
8
- @pytest .mark .skipif (not matplotlib .checkdep_usetex (True ),
9
- reason = 'Missing TeX or Ghostscript or dvipng' )
10
+ with warnings .catch_warnings ():
11
+ warnings .simplefilter ('ignore' )
12
+ needs_usetex = pytest .mark .skipif (
13
+ not matplotlib .checkdep_usetex (True ),
14
+ reason = 'Missing TeX of Ghostscript or dvipng' )
15
+
16
+
17
+ @needs_usetex
10
18
@image_comparison (baseline_images = ['test_usetex' ],
11
19
extensions = ['pdf' , 'png' ],
12
20
tol = 0.3 )
You can’t perform that action at this time.
0 commit comments