Skip to content

Replace @flaky.flaky decorate with pytest marker #1544

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
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
3 changes: 1 addition & 2 deletions tests/services/kernels/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import jupyter_client
import pytest
import tornado
from flaky import flaky
from jupyter_client.kernelspec import NATIVE_KERNEL_NAME
from tornado.httpclient import HTTPClientError

Expand Down Expand Up @@ -257,7 +256,7 @@ async def test_kernel_handler_startup_error_pending(
await jp_ws_fetch("api", "kernels", kid, "channels")


@flaky
@pytest.mark.flaky
@pytest.mark.timeout(TEST_TIMEOUT)
async def test_connection(jp_fetch, jp_ws_fetch, jp_http_port, jp_auth_header):
# Create kernel
Expand Down
3 changes: 1 addition & 2 deletions tests/services/kernels/test_execution_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import jupyter_client
import pytest
from flaky import flaky
from tornado.httpclient import HTTPClientError
from traitlets.config import Config

Expand All @@ -18,7 +17,7 @@
MINIMUM_CONSISTENT_COUNT = 4


@flaky
@pytest.mark.flaky
async def test_execution_state(jp_fetch, jp_ws_fetch):
r = await jp_fetch("api", "kernels", method="POST", allow_nonstandard_methods=True)
kernel = json.loads(r.body.decode())
Expand Down
3 changes: 1 addition & 2 deletions tests/services/sessions/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import jupyter_client
import pytest
import tornado
from flaky import flaky
from jupyter_client.ioloop import AsyncIOLoopKernelManager
from nbformat import writes
from nbformat.v4 import new_notebook
Expand Down Expand Up @@ -505,7 +504,7 @@ async def test_modify_kernel_id(session_client, jp_fetch, jp_serverapp, session_
assert kernel_list == [kernel]


@flaky
@pytest.mark.flaky
@pytest.mark.timeout(TEST_TIMEOUT)
async def test_restart_kernel(session_client, jp_base_url, jp_fetch, jp_ws_fetch, session_is_ready):
# Create a session.
Expand Down
5 changes: 2 additions & 3 deletions tests/test_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import warnings

import pytest
from flaky import flaky # type:ignore[import-untyped]
from tornado.httpclient import HTTPClientError
from traitlets.config import Config

Expand Down Expand Up @@ -230,7 +229,7 @@ async def test_terminal_create_with_bad_cwd(jp_fetch, jp_ws_fetch):
assert non_existing_path not in message_stdout


@flaky
@pytest.mark.flaky
def test_culling_config(jp_server_config, jp_configurable_serverapp):
app = jp_configurable_serverapp()
terminal_mgr_config = app.config.ServerApp.TerminalManager
Expand All @@ -242,7 +241,7 @@ def test_culling_config(jp_server_config, jp_configurable_serverapp):
assert terminal_mgr_settings.cull_interval == CULL_INTERVAL


@flaky
@pytest.mark.flaky
async def test_culling(jp_server_config, jp_fetch):
# POST request
resp = await jp_fetch(
Expand Down
Loading