mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
24 lines
913 B
Python
24 lines
913 B
Python
import pytest
|
|
|
|
from tests.support.pytest.helpers import reap_stray_processes
|
|
|
|
|
|
@pytest.fixture(scope="package", autouse=True)
|
|
def _auto_skip_on_fedora_40(grains):
|
|
if grains["osfinger"] == "Fedora Linux-40":
|
|
pytest.skip(
|
|
"Fedora 40 ships with Python 3.12. Test can't run with system Python on 3.12"
|
|
# Actually, the problem is that the tornado we ship is not prepared for Python 3.12,
|
|
# and it imports `ssl` and checks if the `match_hostname` function is defined, which
|
|
# has been deprecated since Python 3.7, so, the logic goes into trying to import
|
|
# backports.ssl-match-hostname which is not installed on the system.
|
|
)
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def _reap_stray_processes(grains):
|
|
# when tests timeout, we migth leave child processes behind
|
|
# nuke them
|
|
with reap_stray_processes():
|
|
# Run test
|
|
yield
|