Skip to content

Use venv for Python tests#26

Open
zmoon wants to merge 6 commits intoufs-community:mainfrom
zmoon:python-venv
Open

Use venv for Python tests#26
zmoon wants to merge 6 commits intoufs-community:mainfrom
zmoon:python-venv

Conversation

@zmoon
Copy link
Copy Markdown
Collaborator

@zmoon zmoon commented May 8, 2026

so that it will work in read-only container

zmoon added 5 commits May 8, 2026 15:44
@zmoon zmoon marked this pull request as ready for review May 8, 2026 22:08
@zmoon zmoon requested a review from Copilot May 8, 2026 22:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates CECE’s CTest-based Python test setup to run inside a build-directory virtual environment so test dependencies can be installed even when the base environment is read-only (e.g., certain container runtimes). It also adjusts the GitHub Actions workflow to avoid installing some Python test deps globally since they’ll be installed into the venv by CTest fixtures.

Changes:

  • Create a Python venv under the CMake build directory and run Python/pytest tests using that venv interpreter.
  • Add CTest fixtures to upgrade pip and install Python test dependencies into the venv before running Python tests.
  • Update CI to stop globally installing pytest/pyyaml (now installed by CTest fixtures) while keeping deps needed for scripts run outside CTest.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
CMakeLists.txt Adds build-dir venv creation + fixture-driven pip installs; switches Python tests to use the venv interpreter.
.github/workflows/ci.yml Removes global pytest/pyyaml install; documents that CTest fixtures handle these in the build-dir venv.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CMakeLists.txt Outdated
Comment thread .github/workflows/ci.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants