Skip to content

Commit 93f11db

Browse files
authored
update tests for 3.14 (#1453)
1 parent f14b95b commit 93f11db

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,29 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
os: [ubuntu-latest, windows-latest, macos-latest]
25+
qt:
26+
- qt5
27+
- qt6
2528
python-version:
2629
- "3.10"
2730
- "3.11"
2831
- "3.12"
2932
- "3.13"
3033
- "3.14"
31-
- "3.14t"
34+
# 3.14t needs a jupyter-core release
35+
# - "3.14t"
3236
- "pypy-3.11"
37+
exclude:
38+
# qt6 not supported on 3.14 yet
39+
- python-version: "3.14"
40+
qt: qt6
41+
- python-version: "3.13"
42+
qt: qt5
43+
- python-version: "3.12"
44+
qt: qt5
45+
- python-version: "3.11"
46+
qt: qt5
47+
3348
steps:
3449
- name: Checkout
3550
uses: actions/checkout@v5
@@ -38,6 +53,11 @@ jobs:
3853
with:
3954
python-version: ${{ matrix.python-version }}
4055

56+
- name: set qt env
57+
run: |
58+
echo "QT=${{ matrix.qt }}" >> $GITHUB_ENV
59+
shell: bash
60+
4161
- name: Install hatch
4262
run: |
4363
python --version

pyproject.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,10 @@ features = ["test", "cov"]
103103
test = "python -m pytest -vv --cov ipykernel --cov-branch --cov-report term-missing:skip-covered {args}"
104104
nowarn = "test -W default {args}"
105105

106-
[[tool.hatch.envs.cov.matrix]]
107-
qt = ["qt5", "qt6"]
108-
109106
[tool.hatch.envs.cov.overrides]
110-
matrix.qt.features = [
111-
{ value = "pyqt5", if = ["qt5"] },
112-
{ value = "pyside6", if = ["qt6"] },
107+
env.QT.features = [
108+
{ value = "pyqt5", if = ["qt5"] },
109+
{ value = "pyside6", if = ["qt6"] },
113110
]
114111

115112
[tool.hatch.envs.typing]

tests/test_kernel.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,14 @@ def test_sys_path_profile_dir():
211211
assert "" in sys_path
212212

213213

214+
# the subprocess print tests fail in pytest,
215+
# but manual tests in notebooks work fine...
216+
217+
214218
@pytest.mark.flaky(max_runs=3)
215219
@pytest.mark.skipif(
216-
sys.platform == "win32" or (sys.platform == "darwin"),
217-
reason="subprocess prints fail on Windows and MacOS Python 3.8+",
220+
sys.platform in {"win32", "darwin"} or sys.version_info >= (3, 14),
221+
reason="test doesn't reliably reproduce subprocess output capture",
218222
)
219223
def test_subprocess_print():
220224
"""printing from forked mp.Process"""
@@ -268,8 +272,8 @@ def test_subprocess_noprint():
268272

269273
@pytest.mark.flaky(max_runs=3)
270274
@pytest.mark.skipif(
271-
(sys.platform == "win32") or (sys.platform == "darwin"),
272-
reason="subprocess prints fail on Windows and MacOS Python 3.8+",
275+
sys.platform in {"win32", "darwin"} or sys.version_info >= (3, 14),
276+
reason="test doesn't reliably reproduce subprocess output capture",
273277
)
274278
def test_subprocess_error():
275279
"""error in mp.Process doesn't crash"""

0 commit comments

Comments
 (0)