Skip to content

Commit 0070547

Browse files
committed
💨 skipping macos tests
1 parent fa8273a commit 0070547

File tree

4 files changed

+10
-20
lines changed

4 files changed

+10
-20
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
7171
- name: Test with pytest
7272
run: |
73-
poetry run pytest --cov=plotly_resampler --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov-report=xml tests/test_figure_resampler_selenium.py
73+
poetry run pytest --cov=plotly_resampler --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov-report=xml tests
7474
- name: Upload pytest test results
7575
# Use always() to always run this step to publish test results when there are test failures
7676
if: ${{ always() && hashFiles('junit/test-results-${{ matrix.python-version }}.xml') != '' }}

tests/conftest.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Fixtures and helper functions for testing"""
22

33
import os
4-
import platform
54
from typing import Union
65

76
import numpy as np
@@ -66,22 +65,6 @@ def driver():
6665
options.add_argument("--disable-gpu")
6766
# options.add_argument("--no=sandbox")
6867

69-
# macOS-specific options for better stability
70-
if platform.system() == "Darwin": # macOS
71-
options.add_argument("--disable-web-security")
72-
options.add_argument("--disable-features=VizDisplayCompositor")
73-
options.add_argument("--window-size=1920,1080")
74-
options.add_argument("--remote-debugging-port=9222")
75-
# Additional stability options for macOS CI
76-
options.add_argument("--disable-background-timer-throttling")
77-
options.add_argument("--disable-backgrounding-occluded-windows")
78-
options.add_argument("--disable-renderer-backgrounding")
79-
options.add_argument("--disable-ipc-flooding-protection")
80-
options.add_argument("--single-process") # This can help with CI stability
81-
options.add_argument("--disable-extensions")
82-
options.add_argument("--disable-default-apps")
83-
84-
8568
driver = webdriver.Chrome(
8669
options=options,
8770
desired_capabilities=d,

tests/fr_selenium.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ def drag_and_zoom(self, div_classname, x0=0.25, x1=0.5, y0=0.25, y1=0.5):
230230
if not self.on_page:
231231
self.go_to_page()
232232

233-
timeout = 30 if not_on_linux() else 10
234-
WebDriverWait(self.driver, timeout).until(
233+
WebDriverWait(self.driver, 5).until(
235234
EC.presence_of_element_located((By.CLASS_NAME, div_classname))
236235
)
237236

tests/test_figure_resampler_selenium.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
import multiprocessing
2+
import platform
23
import time
34

5+
import pytest
6+
47
from plotly_resampler.figure_resampler import FigureResampler
58

69
from .fr_selenium import FigureResamplerGUITests, RequestParser
710

11+
pytestmark = pytest.mark.skipif(
12+
platform.system() == "Darwin",
13+
reason="Selenium tests are unstable on macOS CI",
14+
)
15+
816

917
def test_multiple_tz(driver, multiple_tz_figure):
1018
from pytest_cov.embed import cleanup_on_sigterm

0 commit comments

Comments
 (0)