@@ -14,19 +14,22 @@ def teardown_method(self, method):
14
14
plt .close ("all" )
15
15
16
16
@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" ,
18
19
)
19
20
def test_plotvol2 (self ):
20
21
plotvol2 (5 )
21
22
22
23
@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" ,
24
26
)
25
27
def test_plotvol3 (self ):
26
28
plotvol3 (5 )
27
29
28
30
@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" ,
30
33
)
31
34
def test_plot_point (self ):
32
35
plot_point ((2 , 3 ))
@@ -35,14 +38,16 @@ def test_plot_point(self):
35
38
plot_point ((2 , 3 ), "x" , text = "foo" )
36
39
37
40
@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" ,
39
43
)
40
44
def test_plot_text (self ):
41
45
plot_text ((2 , 3 ), "foo" )
42
46
plot_text (np .r_ [2 , 3 ], "foo" )
43
47
44
48
@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" ,
46
51
)
47
52
def test_plot_box (self ):
48
53
plot_box ("r--" , centre = (- 2 , - 3 ), wh = (1 , 1 ))
@@ -54,15 +59,17 @@ def test_plot_box(self):
54
59
plot_box (centre = (1 , 2 ), wh = (2 , 3 ))
55
60
56
61
@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" ,
58
64
)
59
65
def test_plot_circle (self ):
60
66
plot_circle (1 , (0 , 0 ), "r" ) # red circle
61
67
plot_circle (2 , (0 , 0 ), "b--" ) # blue dashed circle
62
68
plot_circle (0.5 , (0 , 0 ), filled = True , color = "y" ) # yellow filled circle
63
69
64
70
@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" ,
66
73
)
67
74
def test_ellipse (self ):
68
75
plot_ellipse (np .diag ((1 , 2 )), (0 , 0 ), "r" ) # red ellipse
@@ -72,30 +79,34 @@ def test_ellipse(self):
72
79
) # yellow filled ellipse
73
80
74
81
@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" ,
76
84
)
77
85
def test_plot_homline (self ):
78
86
plot_homline ((1 , 2 , 3 ))
79
87
plot_homline ((2 , 1 , 3 ))
80
88
plot_homline ((1 , - 2 , 3 ), "k--" )
81
89
82
90
@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" ,
84
93
)
85
94
def test_cuboid (self ):
86
95
plot_cuboid ((1 , 2 , 3 ), color = "g" )
87
96
plot_cuboid ((1 , 2 , 3 ), centre = (2 , 3 , 4 ), color = "g" )
88
97
plot_cuboid ((1 , 2 , 3 ), filled = True , color = "y" )
89
98
90
99
@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" ,
92
102
)
93
103
def test_sphere (self ):
94
104
plot_sphere (0.3 , color = "r" )
95
105
plot_sphere (1 , centre = (1 , 1 , 1 ), filled = True , color = "b" )
96
106
97
107
@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" ,
99
110
)
100
111
def test_ellipsoid (self ):
101
112
plot_ellipsoid (np .diag ((1 , 2 , 3 )), color = "r" ) # red ellipsoid
@@ -104,7 +115,8 @@ def test_ellipsoid(self):
104
115
) # yellow filled ellipsoid
105
116
106
117
@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" ,
108
120
)
109
121
def test_cylinder (self ):
110
122
plot_cylinder (radius = 0.2 , centre = (0.5 , 0.5 , 0 ), height = [- 0.2 , 0.2 ])
@@ -118,7 +130,8 @@ def test_cylinder(self):
118
130
)
119
131
120
132
@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" ,
122
135
)
123
136
def test_cone (self ):
124
137
plot_cone (radius = 0.2 , centre = (0.5 , 0.5 , 0 ), height = 0.3 )
0 commit comments