FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

TST: Set subprocess timeouts consistently on CI by QuLogic · Pull Request #32198 · matplotlib/matplotlib · GitHub

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (4) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 2 additions & 0 deletions lib/matplotlib/testing/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def subprocess_run_helper(func, *args, timeout, extra_env=None):
extra_env : dict[str, str]
Any additional environment variables to be set for the subprocess.
"""
if is_ci_environment():
timeout *= 6
target = func.__name__
module = func.__module__
file = func.__code__.co_filename
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _get_testable_interactive_backends():


# Reasonable safe values for slower CI/Remote and local architectures.
_test_timeout = 120 if is_ci_environment() else 20
_test_timeout = 20
_retry_count = 3 if is_ci_environment() else 0


Expand Down
6 changes: 3 additions & 3 deletions lib/matplotlib/tests/test_getattr.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import pytest

import matplotlib
from matplotlib.testing import is_ci_environment, subprocess_run_helper
from matplotlib.testing import subprocess_run_helper


# Get the names of all matplotlib submodules,
# except for the unit tests and private modules.
Expand Down Expand Up @@ -59,8 +60,7 @@ def _test_module_getattr():

@pytest.mark.parametrize('module_name', backend_module_names)
def test_backend_getattr(module_name):
proc = subprocess_run_helper(_test_module_getattr, module_name,
timeout=120 if is_ci_environment() else 20)
proc = subprocess_run_helper(_test_module_getattr, module_name, timeout=20)
if 'SKIP: ' in proc.stdout:
pytest.skip(proc.stdout.removeprefix('SKIP: '))
print(proc.stdout)
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_pickle.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import matplotlib as mpl
from matplotlib import cm
from matplotlib.testing import subprocess_run_helper, is_ci_environment
from matplotlib.testing import subprocess_run_helper
from matplotlib.testing.decorators import check_figures_equal
from matplotlib.dates import rrulewrapper # type: ignore[attr-defined]
from matplotlib.lines import VertexSelector
Expand Down Expand Up @@ -319,6 +319,6 @@ def _test_axeswidget_interactive():
def test_axeswidget_interactive():
subprocess_run_helper(
_test_axeswidget_interactive,
timeout=120 if is_ci_environment() else 20,
timeout=20,
extra_env={'MPLBACKEND': 'tkagg'}
)
Loading

Back | FazBrowse Home | New Git URL