Skip to content

Replace @flaky.flaky decorate with pytest marker #334

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
11 changes: 5 additions & 6 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import nbformat
import pytest
import xmltodict
from flaky import flaky # type:ignore[import-untyped]
from jupyter_client._version import version_info
from jupyter_client.client import KernelClient
from jupyter_client.kernelspec import KernelSpecManager
Expand Down Expand Up @@ -354,7 +353,7 @@ def test_run_all_notebooks(input_name, opts):
assert_notebooks_equal(input_nb, output_nb)


@flaky
@pytest.mark.flaky
def test_parallel_notebooks(capfd, tmpdir):
"""Two notebooks should be able to be run simultaneously without problems.

Expand All @@ -380,7 +379,7 @@ def test_parallel_notebooks(capfd, tmpdir):
assert filter_messages_on_error_output(captured.err) == ""


@flaky
@pytest.mark.flaky
@pytest.mark.skipif(os.name == "nt", reason="warns about event loop on Windows")
def test_many_parallel_notebooks(capfd):
"""Ensure that when many IPython kernels are run in parallel, nothing awful happens.
Expand Down Expand Up @@ -408,7 +407,7 @@ def test_many_parallel_notebooks(capfd):
assert filter_messages_on_error_output(captured.err) == ""


@flaky
@pytest.mark.flaky
def test_async_parallel_notebooks(capfd, tmpdir):
"""Two notebooks should be able to be run simultaneously without problems.

Expand All @@ -435,7 +434,7 @@ async def run_tasks():
assert filter_messages_on_error_output(captured.err) == ""


@flaky
@pytest.mark.flaky
def test_many_async_parallel_notebooks(capfd):
"""Ensure that when many IPython kernels are run in parallel, nothing awful happens.

Expand Down Expand Up @@ -673,7 +672,7 @@ def test_sync_kernel_manager(self):
assert info_msg is not None
assert "name" in info_msg["content"]["language_info"]

@flaky
@pytest.mark.flaky
def test_kernel_death_after_timeout(self):
"""Check that an error is raised when the kernel is_alive is false after a cell timed out"""
filename = os.path.join(current_dir, "files", "Interrupt.ipynb")
Expand Down