Skip to content

Commit dacd8b9

Browse files
authored
Merge pull request #2952 from tomjakubowski/bugfix/pytest-timeout
Add timeouts to pytest, fix jupyterlab error
2 parents 7b56a60 + c6a51f8 commit dacd8b9

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ jobs:
776776
run: python -c 'import perspective'
777777

778778
- name: Run pytests
779-
run: pytest -v --pyargs 'perspective.tests'
779+
run: pytest -v --pyargs 'perspective.tests' --timeout=300
780780

781781
# ,-,---. . .
782782
# '|___/ ,-. ,-. ,-. |-. ,-,-. ,-. ,-. | ,

packages/perspective-jupyterlab/src/js/view.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class PerspectiveView extends DOMWidgetView {
7171
const { Client } = wasm_module;
7272
// Responses are fed to the client in the widget's msg:custom handler
7373
this.perspective_client = new Client(
74-
(binary_msg) => {
74+
async (binary_msg) => {
7575
const buffer = binary_msg.slice().buffer;
7676
this.send(
7777
{ type: "binary_msg", client_id: this.psp_client_id },

rust/perspective-python/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ psutil==6.0.0
1414
pytest==8.2.2
1515
pytest-asyncio==0.25.3
1616
pytest-sugar==1.0.0
17+
pytest-timeout==2.3.1
1718
ruff==0.5.0
1819
tornado==6.4.1
1920
traitlets==5.14.3

rust/perspective-python/test.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ if (process.env.PSP_PYODIDE) {
5151
execOpts
5252
);
5353
} else {
54-
execFileSync("pytest", ["perspective/tests", "-W error", ...process.argv.slice(2)], execOpts);
54+
execFileSync("pytest", ["perspective/tests", "-W error", "--timeout=300", ...process.argv.slice(2)], execOpts);
5555
}

0 commit comments

Comments
 (0)