Skip to content

Commit acf6390

Browse files
authored
Handle test failures (#1289)
1 parent d48843e commit acf6390

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/python-tests.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ jobs:
3636
run: |
3737
sudo apt-get update
3838
sudo apt-get install texlive-plain-generic inkscape texlive-xetex
39-
sudo apt-get install xvfb x11-utils libxkbcommon-x11-0 pandoc
39+
sudo apt-get install xvfb x11-utils libxkbcommon-x11-0
40+
# pandoc is not up to date in the ubuntu repos, so we install directly
41+
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
4042
- name: Run the tests on posix
4143
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(matrix.os, 'windows') }}
4244
run: hatch run cov:test --cov-fail-under 75 || hatch run test:test --lf

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ test = [
6363
"pytest-jupyter[server]>=0.4",
6464
"pytest>=7.0",
6565
"requests",
66-
"pre-commit"
66+
"pre-commit",
67+
'flaky'
6768
]
6869
docs = [
6970
"ipykernel",

tests/test_terminal.py

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import warnings
88

99
import pytest
10+
from flaky import flaky # type:ignore
1011
from tornado.httpclient import HTTPClientError
1112
from traitlets.config import Config
1213

@@ -229,6 +230,7 @@ async def test_terminal_create_with_bad_cwd(jp_fetch, jp_ws_fetch):
229230
assert non_existing_path not in message_stdout
230231

231232

233+
@flaky
232234
def test_culling_config(jp_server_config, jp_configurable_serverapp):
233235
app = jp_configurable_serverapp()
234236
terminal_mgr_config = app.config.ServerApp.TerminalManager
@@ -240,6 +242,7 @@ def test_culling_config(jp_server_config, jp_configurable_serverapp):
240242
assert terminal_mgr_settings.cull_interval == CULL_INTERVAL
241243

242244

245+
@flaky
243246
async def test_culling(jp_server_config, jp_fetch):
244247
# POST request
245248
resp = await jp_fetch(

0 commit comments

Comments
 (0)