From 9a879bfca65ee3b23170431f5fda07255bc5c355 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 19 Jun 2023 08:35:29 -0500 Subject: [PATCH] handle test failures --- .github/workflows/python-tests.yml | 4 +++- tests/test_terminal.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) 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/tests/test_terminal.py b/tests/test_terminal.py index 3af0e57795..718304f0d0 100644 --- a/tests/test_terminal.py +++ b/tests/test_terminal.py @@ -7,6 +7,7 @@ import warnings import pytest +from flaky import flaky 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(