diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 9b967d17be..3f597dc80f 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -36,7 +36,9 @@ jobs: run: | sudo apt-get update sudo apt-get install texlive-plain-generic inkscape texlive-xetex - sudo apt-get install xvfb x11-utils libxkbcommon-x11-0 pandoc + sudo apt-get install xvfb x11-utils libxkbcommon-x11-0 + # pandoc is not up to date in the ubuntu repos, so we install directly + wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-amd64.deb && sudo dpkg -i pandoc-3.1.2-1-amd64.deb - name: Run the tests on posix if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(matrix.os, 'windows') }} run: hatch run cov:test --cov-fail-under 75 || hatch run test:test --lf diff --git a/pyproject.toml b/pyproject.toml index 4a956c31dd..c2d9867ff8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,8 @@ test = [ "pytest-jupyter[server]>=0.4", "pytest>=7.0", "requests", - "pre-commit" + "pre-commit", + 'flaky' ] docs = [ "ipykernel", diff --git a/tests/test_terminal.py b/tests/test_terminal.py index 3af0e57795..231bccc489 100644 --- a/tests/test_terminal.py +++ b/tests/test_terminal.py @@ -7,6 +7,7 @@ import warnings import pytest +from flaky import flaky # type:ignore from tornado.httpclient import HTTPClientError from traitlets.config import Config @@ -229,6 +230,7 @@ async def test_terminal_create_with_bad_cwd(jp_fetch, jp_ws_fetch): assert non_existing_path not in message_stdout +@flaky def test_culling_config(jp_server_config, jp_configurable_serverapp): app = jp_configurable_serverapp() terminal_mgr_config = app.config.ServerApp.TerminalManager @@ -240,6 +242,7 @@ def test_culling_config(jp_server_config, jp_configurable_serverapp): assert terminal_mgr_settings.cull_interval == CULL_INTERVAL +@flaky async def test_culling(jp_server_config, jp_fetch): # POST request resp = await jp_fetch(