From 6b63a926f1647e2b71eb97c757b3d12a10fb587d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 29 Sep 2026 12:21:20 +0000 Subject: [PATCH 1/2] Initial plan From 6c7af8c91666f50b2cd981e47ed73ccdfd258b00 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 29 Sep 2026 12:23:14 +0000 Subject: [PATCH 2/2] Run test_sample_quests serially on macOS and use sys.executable Co-authored-by: MarcCote <660004+MarcCote@users.noreply.github.com> --- .github/workflows/tests.yml | 11 ++++++++++- tests/test_sample_quests.py | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 19c054db..627b6087 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,6 +33,15 @@ jobs: run: | python -m pip install --upgrade pip pip install -e .[dev] - - name: Run tests + - name: Run tests (Linux) + if: startsWith(matrix.os, 'ubuntu') run: | pytest -n 16 -sv --cov=textworld --cov-report=term-missing --cov-fail-under=85 tests/ textworld/ + + # On MacOS, tests/test_sample_quests.py crashes when run concurrently with + # pytest-xdist (native rendering/Graphviz), so it is run serially instead. + - name: Run tests (MacOS) + if: startsWith(matrix.os, 'macos') + run: | + pytest -n 16 -sv --cov=textworld --cov-report= --ignore=tests/test_sample_quests.py tests/ textworld/ + pytest -sv --cov=textworld --cov-append --cov-report=term-missing --cov-fail-under=85 tests/test_sample_quests.py diff --git a/tests/test_sample_quests.py b/tests/test_sample_quests.py index 41ec782b..1a2001e6 100644 --- a/tests/test_sample_quests.py +++ b/tests/test_sample_quests.py @@ -2,6 +2,7 @@ # Licensed under the MIT license. import os +import sys from os.path import join as pjoin from subprocess import check_output @@ -17,7 +18,7 @@ def test_sample_quests(): check_output(command).decode() script = pjoin(SCRIPTS_PATH, "sample_quests.py") - command = ["python", script, "--nb-quests", "10", "--quest-length", "10", + command = [sys.executable, script, "--nb-quests", "10", "--quest-length", "10", "--quest-breadth", "5", "--output", tmpdir, game_file] stdout = check_output(command).decode() assert len(stdout) > 0