Skip to content

Commit e5bf170

Browse files
committed
Fix CI test errors
- skips tests that run forever, interaction of plt.pause() with Agg backend.
1 parent aff08d2 commit e5bf170

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
env:
4040
MPLBACKEND: Agg
4141
run: |
42-
pytest -s --ignore=W605 --timeout=50 --timeout_method=thread
42+
pytest -s --timeout=50 --timeout_method=thread
4343
4444
codecov:
4545
# If all tests pass:

tests/base/test_transforms3d_plot.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from math import pi
1515
import math
1616
from scipy.linalg import logm, expm
17+
import os
1718
import pytest
1819
import sys
1920

@@ -25,8 +26,9 @@
2526

2627
class Test3D(unittest.TestCase):
2728
@pytest.mark.skipif(
28-
sys.platform.startswith("darwin") and sys.version_info < (3, 11),
29-
reason="tkinter bug with mac",
29+
os.environ.get("CI") == "true"
30+
or (sys.platform.startswith("darwin") and sys.version_info < (3, 11)),
31+
reason="no display in CI / tkinter bug on mac",
3032
)
3133
def test_plot(self):
3234
plt.figure()
@@ -72,8 +74,9 @@ def test_plot(self):
7274
plt.close("all")
7375

7476
@pytest.mark.skipif(
75-
sys.platform.startswith("darwin") and sys.version_info < (3, 11),
76-
reason="tkinter bug with mac",
77+
os.environ.get("CI") == "true"
78+
or (sys.platform.startswith("darwin") and sys.version_info < (3, 11)),
79+
reason="no display in CI / tkinter bug on mac",
7780
)
7881
def test_animate(self):
7982
tranimate(transl(1, 2, 3), repeat=False, wait=True)

0 commit comments

Comments
 (0)