Skip to content

Handle test failures #1289

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

Merged
merged 3 commits into from
Jun 19, 2023
Merged
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
4 changes: 3 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ test = [
"pytest-jupyter[server]>=0.4",
"pytest>=7.0",
"requests",
"pre-commit"
"pre-commit",
'flaky'
]
docs = [
"ipykernel",
Expand Down
3 changes: 3 additions & 0 deletions tests/test_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import warnings

import pytest
from flaky import flaky # type:ignore
from tornado.httpclient import HTTPClientError
from traitlets.config import Config

Expand Down Expand Up @@ -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
Expand All @@ -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(
Expand Down