From 84c6bd17a6fb7bebfd24a1f559af571ab85365b3 Mon Sep 17 00:00:00 2001 From: "Kenneth J. Pronovici" Date: Wed, 15 Apr 2026 01:53:37 +0000 Subject: [PATCH] Fix pytest-testdox output in GHA Windows runner --- .run/commands/pytest.sh | 9 ++------- Changelog | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.run/commands/pytest.sh b/.run/commands/pytest.sh index ff8c8d9..f3be2e2 100644 --- a/.run/commands/pytest.sh +++ b/.run/commands/pytest.sh @@ -33,20 +33,15 @@ command_pytest() { shift $((OPTIND -1)) # pop off the options consumed by getopts - color="" - if [ "$GITHUB_ACTIONS" == "true" ] && [ "$RUNNER_OS" == "Windows" ]; then - color="--color no" # color messes up the terminal on Windows in GHA - fi - if [ $coverage == "yes" ]; then - run_command uvrun pytest --cov=. --testdox --force-testdox $color $tests + PYTHONUTF8=1 run_command uvrun pytest --cov=. --testdox --force-testdox $tests run_command uvrun coverage lcov -o .coverage.lcov if [ $html == "yes" ]; then run_command uvrun coverage html -d .htmlcov run_command openfile .htmlcov/index.html fi else - run_command uvrun pytest --testdox --force-testdox $color $tests + PYTHONUTF8=1 run_command uvrun pytest --testdox --force-testdox $tests fi } diff --git a/Changelog b/Changelog index a4c93c3..bf055d1 100644 --- a/Changelog +++ b/Changelog @@ -6,6 +6,7 @@ Version 0.3.1 unreleased * Fix Sphinx autoapi to generate docs for source, not tests. * Add support for Visual Studio Code as an IDE. * Use pytest-cov for test coverage, for more consistency. + * Fix pytest-testdox output in GHA Windows runner. Version 0.3.0 24 Sep 2025