feat: integrate pytest-gitlab by ptalbert · Pull Request #3313 · python-gitlab/python-gitlab
Repository navigation
feat: integrate pytest-gitlab - #3313
Draft
ptalbert wants to merge 5 commits into python-gitlab:main from ptalbert:add_pytest-gitlab
Draft
feat: integrate pytest-gitlab #3313 ptalbert wants to merge 5 commits into python-gitlab:main from ptalbert:add_pytest-gitlab
Conversation
ptalbert commented Dec 18, 2025
Copy link Copy Markdown
Fixes : #3046
This takes the pytest-gitlab plugin from https://gitlab.com/thht_science_software/pytest-gitlab and puts it in gitlab/testing/. It is then exposed as a pytest plugin "gitlab" and the existing tests/ fixtures are removed.
ptalbert commented Dec 18, 2025
Copy link Copy Markdown
Author
|
All the existing tests pass when I run |
codecov
Bot
commented
Dec 18, 2025
·
edited
Loading
Copy link Copy Markdown
Codecov Report❌ Patch coverage is @@ Coverage Diff @@ ## main #3313 +/- ## ========================================== - Coverage 95.75% 90.17% -5.58% ========================================== Files 98 103 +5 Lines 6051 6425 +374 ========================================== Hits 5794 5794 - Misses 257 631 +374
Flags with carried forward coverage won't be shown. Click here to find out more.
|
View reviewed changes
nejch left a comment
Copy link Copy Markdown
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
@ptalbert thank you so much for tackling this! I think some of this might need updating to match our current testing environment, since pytest-gitlab was last updated in 2024 from what I can see. It might also help fix the test failures, as we recently also updated that to make it work on GitLab 18.x.
To make that a bit more manageable, would it make sense to split this into smaller PRs - e.g. prepare the changes needed so that the final PR is mostly just copying files? That would make things easier to review as well I think 🙇 thanks!
Comment thread gitlab/testing/docker/docker-compose.yml| services: | ||
| gitlab: | ||
| image: '${GITLAB_IMAGE}:${GITLAB_TAG}' | ||
| image: '${GITLAB_IMAGE :-gitlab/gitlab-ee }:${GITLAB_TAG :-latest }' |
chore(flake8): set extend-exclude option in lieu of exclude and add ....
591ca65
...direnv Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
feat(testing): incorporate pytest-gitlab plugin framework
c650edb
Take the framework of pytest-gitlab but use the current python-gitlab functional testing fixtures. Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
chore(pytest-gitlab): rename fixture_dir to docker_assets_dir
c2aecc4
IMHO this makes it more clear what this is. Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
test: add a basic test to confirm the expected pytest gitlab plugin...
0f114d5
... is present Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
fix(tests): exclude new pytest-gitlab plugin when running tests via tox
5414694
The previous commit adds a new pytest plugin `pytest-gitlab` but does not (yet) update the existing tests to use it. For now it needs to explicitly be disabled when running tests so it does not interfere with the original fixtures. Since tox now runs the tests with `-p no:gitlab` the test_gitflab_plugin_is_loaded test will always fail. Skip it for now and instead ensure the entrypoint is at least there. Signed-off-by: Patrick Talbert <ptalbert@redhat.com>ptalbert force-pushed the add_pytest-gitlab branch from
3711b46 to
5414694
Compare
January 7, 2026 11:47
ptalbert commented Jan 7, 2026
Copy link Copy Markdown
Author
|
I suppose the codecov report is lighting up because this PR does not actually exercise the gitlab/testing/ code any more. As I see it the options are:
Doing #1 as a temporary solution seems best if we do not want to do #3 yet. #2 would be great but that is a large undertaking. |
thespags commented Oct 3, 2026
Copy link Copy Markdown
|
Hi. This would be amazing to get in. I'm wondering whether you need any help to get this over the line. |
thespags commented Oct 5, 2026
Copy link Copy Markdown
@JohnVillalovos and @ptalbert , hi, I just wanted to check in to see if I could pick this up or assist in any way to get it merged. Thank you. |
This branch has not been deployed
No deployments
Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment