@@ -14,19 +14,22 @@ def teardown_method(self, method):
1414 plt .close ("all" )
1515
1616 @pytest .mark .skipif (
17- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
17+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
18+ reason = "tkinter bug with mac" ,
1819 )
1920 def test_plotvol2 (self ):
2021 plotvol2 (5 )
2122
2223 @pytest .mark .skipif (
23- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
24+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
25+ reason = "tkinter bug with mac" ,
2426 )
2527 def test_plotvol3 (self ):
2628 plotvol3 (5 )
2729
2830 @pytest .mark .skipif (
29- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
31+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
32+ reason = "tkinter bug with mac" ,
3033 )
3134 def test_plot_point (self ):
3235 plot_point ((2 , 3 ))
@@ -35,14 +38,16 @@ def test_plot_point(self):
3538 plot_point ((2 , 3 ), "x" , text = "foo" )
3639
3740 @pytest .mark .skipif (
38- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
41+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
42+ reason = "tkinter bug with mac" ,
3943 )
4044 def test_plot_text (self ):
4145 plot_text ((2 , 3 ), "foo" )
4246 plot_text (np .r_ [2 , 3 ], "foo" )
4347
4448 @pytest .mark .skipif (
45- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
49+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
50+ reason = "tkinter bug with mac" ,
4651 )
4752 def test_plot_box (self ):
4853 plot_box ("r--" , centre = (- 2 , - 3 ), wh = (1 , 1 ))
@@ -54,15 +59,17 @@ def test_plot_box(self):
5459 plot_box (centre = (1 , 2 ), wh = (2 , 3 ))
5560
5661 @pytest .mark .skipif (
57- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
62+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
63+ reason = "tkinter bug with mac" ,
5864 )
5965 def test_plot_circle (self ):
6066 plot_circle (1 , (0 , 0 ), "r" ) # red circle
6167 plot_circle (2 , (0 , 0 ), "b--" ) # blue dashed circle
6268 plot_circle (0.5 , (0 , 0 ), filled = True , color = "y" ) # yellow filled circle
6369
6470 @pytest .mark .skipif (
65- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
71+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
72+ reason = "tkinter bug with mac" ,
6673 )
6774 def test_ellipse (self ):
6875 plot_ellipse (np .diag ((1 , 2 )), (0 , 0 ), "r" ) # red ellipse
@@ -72,30 +79,34 @@ def test_ellipse(self):
7279 ) # yellow filled ellipse
7380
7481 @pytest .mark .skipif (
75- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
82+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
83+ reason = "tkinter bug with mac" ,
7684 )
7785 def test_plot_homline (self ):
7886 plot_homline ((1 , 2 , 3 ))
7987 plot_homline ((2 , 1 , 3 ))
8088 plot_homline ((1 , - 2 , 3 ), "k--" )
8189
8290 @pytest .mark .skipif (
83- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
91+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
92+ reason = "tkinter bug with mac" ,
8493 )
8594 def test_cuboid (self ):
8695 plot_cuboid ((1 , 2 , 3 ), color = "g" )
8796 plot_cuboid ((1 , 2 , 3 ), centre = (2 , 3 , 4 ), color = "g" )
8897 plot_cuboid ((1 , 2 , 3 ), filled = True , color = "y" )
8998
9099 @pytest .mark .skipif (
91- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
100+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
101+ reason = "tkinter bug with mac" ,
92102 )
93103 def test_sphere (self ):
94104 plot_sphere (0.3 , color = "r" )
95105 plot_sphere (1 , centre = (1 , 1 , 1 ), filled = True , color = "b" )
96106
97107 @pytest .mark .skipif (
98- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
108+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
109+ reason = "tkinter bug with mac" ,
99110 )
100111 def test_ellipsoid (self ):
101112 plot_ellipsoid (np .diag ((1 , 2 , 3 )), color = "r" ) # red ellipsoid
@@ -104,7 +115,8 @@ def test_ellipsoid(self):
104115 ) # yellow filled ellipsoid
105116
106117 @pytest .mark .skipif (
107- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
118+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
119+ reason = "tkinter bug with mac" ,
108120 )
109121 def test_cylinder (self ):
110122 plot_cylinder (radius = 0.2 , centre = (0.5 , 0.5 , 0 ), height = [- 0.2 , 0.2 ])
@@ -118,7 +130,8 @@ def test_cylinder(self):
118130 )
119131
120132 @pytest .mark .skipif (
121- sys .platform .startswith ("darwin" ), reason = "tkinter bug with mac"
133+ sys .platform .startswith ("darwin" ) and sys .version_info < (3 , 11 ),
134+ reason = "tkinter bug with mac" ,
122135 )
123136 def test_cone (self ):
124137 plot_cone (radius = 0.2 , centre = (0.5 , 0.5 , 0 ), height = 0.3 )
0 commit comments