From 997caab87c21804e47a359afec08cd1e8aa9effd Mon Sep 17 00:00:00 2001 From: icp Date: Sat, 8 Jul 2023 21:59:23 +0530 Subject: [PATCH] common/build-style/python3-module.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing Fixes `ImportMismatchError` for doctest-modules in pytest Ref: https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723 --- common/build-style/python3-module.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/build-style/python3-module.sh b/common/build-style/python3-module.sh index b76d89c8b50..8aec7a0e459 100644 --- a/common/build-style/python3-module.sh +++ b/common/build-style/python3-module.sh @@ -12,7 +12,7 @@ do_check() { if python3 -c 'import xdist' >/dev/null 2>&1; then testjobs="-n $XBPS_MAKEJOBS" fi - PYTHONPATH="$(cd build/lib* && pwd)" \ + PYTHONPATH="$(cd build/lib* && pwd)" PY_IGNORE_IMPORTMISMATCH=1 \ ${make_check_pre} \ python3 -m pytest ${testjobs} ${make_check_args} ${make_check_target} else