Skip to content

ci: reduce flakiness a little #2418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
PYPY = platform.python_implementation() == "PyPy"

PY2 = sys.version_info.major == 2

PY = sys.version_info
9 changes: 9 additions & 0 deletions tests/test_gil_scoped.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# -*- coding: utf-8 -*-
import multiprocessing
import threading

import pytest

import env # noqa: F401

from pybind11_tests import gil_scoped as m


Expand Down Expand Up @@ -57,6 +62,8 @@ def test_python_to_cpp_to_python_from_thread():
assert _run_in_process(_python_to_cpp_to_python_from_threads, 1) == 0


# TODO: FIXME
@pytest.mark.xfail("env.PY > (3,8) and env.MACOS", strict=False)
def test_python_to_cpp_to_python_from_thread_multiple_parallel():
"""Makes sure there is no GIL deadlock when running in a thread multiple times in parallel.

Expand All @@ -73,6 +80,8 @@ def test_python_to_cpp_to_python_from_thread_multiple_sequential():
assert _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=False) == 0


# TODO: FIXME
@pytest.mark.xfail("env.PY > (3,8) and env.MACOS", strict=False)
def test_python_to_cpp_to_python_from_process():
"""Makes sure there is no GIL deadlock when using processes.

Expand Down