From dea23730062e1e2f3920ead60d5bf0ea1381d8f9 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Tue, 31 Oct 2023 21:07:14 -0500 Subject: [PATCH] Install the project editable to avoid ambiguity that pytest dislikes --- .github/workflows/ci.yml | 4 ++++ .gitlab-ci.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e965b95..30c81bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,6 +64,10 @@ jobs: - name: "Main Script" run: | curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project-within-miniconda.sh + # pytest gets angry when 'import pytato.array' may come + # from both the project file and the venv. This matters + # because of doctest collection. + PROJECT_INSTALL_FLAGS="--editable" . ./build-and-test-py-project-within-miniconda.sh examples: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ffa1aeb..56b5bf0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,10 @@ Python 3 POCL: - export PYOPENCL_TEST=portable:pthread - export EXTRA_INSTALL="pyopencl mpi4py jax[cpu]" - curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh + # pytest gets angry when 'import pytato.array' may come + # from both the project file and the venv. This matters + # because of doctest collection. + - 'PROJECT_INSTALL_FLAGS="--editable"' - ". ./build-and-test-py-project.sh" tags: - python3 -- GitLab