File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
mpl_toolkits/mplot3d/tests Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 5
5
from unittest import mock
6
6
7
7
from cycler import cycler , Cycler
8
+ from packaging .version import parse as parse_version
8
9
import pytest
9
10
10
11
import matplotlib as mpl
@@ -539,7 +540,12 @@ def test_backend_fallback_headless(tmp_path):
539
540
sys .platform == "linux" and not _c_internal_utils .xdisplay_is_valid (),
540
541
reason = "headless" )
541
542
def test_backend_fallback_headful (tmp_path ):
542
- pytest .importorskip ("tkinter" )
543
+ if parse_version (pytest .__version__ ) >= parse_version ('8.2.0' ):
544
+ pytest_kwargs = dict (exc_type = ImportError )
545
+ else :
546
+ pytest_kwargs = {}
547
+
548
+ pytest .importorskip ("tkinter" , ** pytest_kwargs )
543
549
env = {** os .environ , "MPLBACKEND" : "" , "MPLCONFIGDIR" : str (tmp_path )}
544
550
backend = subprocess_run_for_testing (
545
551
[sys .executable , "-c" ,
Original file line number Diff line number Diff line change 1
1
import functools
2
2
import itertools
3
3
import platform
4
+ import sys
4
5
5
6
import pytest
6
7
@@ -115,7 +116,7 @@ def test_axes3d_repr():
115
116
116
117
117
118
@mpl3d_image_comparison (['axes3d_primary_views.png' ], style = 'mpl20' ,
118
- tol = 0.05 if platform . machine () == "arm64 " else 0 )
119
+ tol = 0.05 if sys . platform == "darwin " else 0 )
119
120
def test_axes3d_primary_views ():
120
121
# (elev, azim, roll)
121
122
views = [(90 , - 90 , 0 ), # XY
You can’t perform that action at this time.
0 commit comments