Skip to content

fix(test): switch to venv in tests#862

Merged
k-dovgan merged 46 commits into
masterfrom
fix-tests
Jun 16, 2026
Merged

fix(test): switch to venv in tests#862
k-dovgan merged 46 commits into
masterfrom
fix-tests

Conversation

@k-dovgan

Copy link
Copy Markdown
Contributor
  • Switch to venv in tests according to recommendations
  • Make post-commit optional for non-main branches
  • Also fix doctest for Python3.14 new warning format

@github-actions

Copy link
Copy Markdown

Here is the summarized build result:
5. Executing build steps
5.1. [ 1/8 ] Create virtual environment - Success
5.2. [ 2/8 ] Update Docker images - Success
5.3. [ 3/8 ] Install Universum for tests - Success
5.4. [ 4/8 ] Make - Success
5.5. Collecting artifacts for the 'Make' step - Success
5.6. [ 5/8 ] Make tests - Success
5.7. Collecting artifacts for the 'Make tests' step - Success
5.8. [ 6/8 ] Collect test results - Success
5.9. Collecting artifacts for the 'Collect test results' step - Success
5.10. [ 7/8 ] Run static pylint - Failed
5.11. [ 8/8 ] Run static type checker - Success

Here is the link to Github Actions build: https://github.com/Samsung/Universum/actions/runs/27533336011

@github-actions

Copy link
Copy Markdown

Here is the summarized build result:
5. Executing build steps
5.1. [ 1/8 ] Create virtual environment - Success
5.2. [ 2/8 ] Update Docker images - Success
5.3. [ 3/8 ] Install Universum for tests - Success
5.4. [ 4/8 ] Make - Success
5.5. Collecting artifacts for the 'Make' step - Success
5.6. [ 5/8 ] Make tests - Success
5.7. Collecting artifacts for the 'Make tests' step - Success
5.8. [ 6/8 ] Collect test results - Success
5.9. Collecting artifacts for the 'Collect test results' step - Success
5.10. [ 7/8 ] Run static pylint - Failed
5.11. [ 8/8 ] Run static type checker - Success

Here is the link to Github Actions build: https://github.com/Samsung/Universum/actions/runs/27537002934

@github-actions

Copy link
Copy Markdown

Here is the summarized build result:
5. Executing build steps
5.1. [ 1/8 ] Create virtual environment - Success
5.2. [ 2/8 ] Update Docker images - Success
5.3. [ 3/8 ] Install Universum for tests - Success
5.4. [ 4/8 ] Make - Success
5.5. Collecting artifacts for the 'Make' step - Success
5.6. [ 5/8 ] Make tests - Success
5.7. Collecting artifacts for the 'Make tests' step - Success
5.8. [ 6/8 ] Collect test results - Success
5.9. Collecting artifacts for the 'Collect test results' step - Success
5.10. [ 7/8 ] Run static pylint - Failed
5.11. [ 8/8 ] Run static type checker - Success

Here is the link to Github Actions build: https://github.com/Samsung/Universum/actions/runs/27537156529

@github-actions

Copy link
Copy Markdown

Test Results

714 tests  ±0   710 ✅ ±0   1h 10m 10s ⏱️ + 50m 21s
  1 suites ±0     4 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 85dfe20. ± Comparison against base commit c1a6943.

Comment thread tests/test_code_report.py
def fixture_runner_with_analyzers(docker_main: UniversumRunner):
docker_main.environment.install_python_module("pylint")
docker_main.environment.install_python_module("mypy")
# This particular test set needs system-wide Python, because analyzers somehow don't support venv

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As I know, you can just use pip and python bins directly from the venv dir, and it should work without regular venv activation.
What was the exact issue with the analyzers in your case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In this particular case we pass python version to analyzers and it launches like "python{version} -m ". So trying to launch this tests launches the system-wide python bin for running analyzer, while using the venv bin for handling the test

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Shortly: pip-in-venv logic works if you are not trying to launch it in docker via python framework :)

@k-dovgan k-dovgan merged commit 06b8a21 into master Jun 16, 2026
10 checks passed
@k-dovgan k-dovgan deleted the fix-tests branch June 16, 2026 05:26
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