| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0f114d5 commit 5414694
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,2 @@ | |||
| 1 | 1 | -r requirements.txt | |
| 2 | 2 | -r requirements-test.txt | |
| 3 | - pytest-docker==3.2.5 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,6 +6,7 @@ pytest-console-scripts==1.4.1 | |||
| 6 | 6 | pytest-cov==7.0.0 | |
| 7 | 7 | pytest-github-actions-annotate-failures==0.3.0 | |
| 8 | 8 | pytest==9.0.2 | |
| 9 | + pytest-docker==3.2.5 | ||
| 9 | 10 | PyYaml==6.0.3 | |
| 10 | 11 | responses==0.25.8 | |
| 11 | 12 | respx==0.22.0 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,17 @@ | |||
| 1 | - """Tests for the gitlab pytest plugin.""" | ||
| 1 | + """Tests for the pytest-gitlab plugin.""" | ||
| 2 | 2 | ||
| 3 | + from importlib.metadata import entry_points | ||
| 3 | 4 | ||
| 4 | - def test_gitlab_plugin_is_registered(request): | ||
| 5 | - """'gitlab' is a registered pytest plugin.""" | ||
| 5 | + import pytest | ||
| 6 | + | ||
| 7 | + | ||
| 8 | + @pytest.mark.skip(reason="pytest-gitlab plugin is disabled in tox") | ||
| 9 | + def test_gitlab_plugin_is_loaded(request): | ||
| 10 | + """'gitlab' is a loaded pytest plugin.""" | ||
| 6 | 11 | assert request.config.pluginmanager.hasplugin("gitlab") | |
| 12 | + | ||
| 13 | + | ||
| 14 | + def test_gitlab_plugin_is_registered(): | ||
| 15 | + """'gitlab' is registered as a pytest11 entry point.""" | ||
| 16 | + pytest11_entry_points = entry_points(group="pytest11") | ||
| 17 | + assert any(ep.value == "gitlab.testing.plugin" for ep in pytest11_entry_points) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,7 @@ passenv = | |||
| 26 | 26 | NO_COLOR | |
| 27 | 27 | PWD | |
| 28 | 28 | PY_COLORS | |
| 29 | - setenv = | ||
| 29 | + setenv = | ||
| 30 | 30 | DOCS_SOURCE = docs | |
| 31 | 31 | DOCS_BUILD = build/sphinx/html | |
| 32 | 32 | VIRTUAL_ENV={envdir} | |
@@ -38,7 +38,7 @@ isolated_build = True | |||
| 38 | 38 | deps = -r{toxinidir}/requirements.txt | |
| 39 | 39 | -r{toxinidir}/requirements-test.txt | |
| 40 | 40 | commands = | |
| 41 | - pytest tests/unit {posargs} | ||
| 41 | + pytest -p no:gitlab tests/unit {posargs} | ||
| 42 | 42 | ||
| 43 | 43 | [testenv:black] | |
| 44 | 44 | basepython = python3 | |
@@ -102,12 +102,12 @@ per-file-ignores = | |||
| 102 | 102 | gitlab/v4/objects/__init__.py:F401,F403 | |
| 103 | 103 | ||
| 104 | 104 | [testenv:docs] | |
| 105 | - description = Builds the docs site. Generated HTML files will be available in '{env:DOCS_BUILD}'. | ||
| 105 | + description = Builds the docs site. Generated HTML files will be available in '{env:DOCS_BUILD}'. | ||
| 106 | 106 | deps = -r{toxinidir}/requirements-docs.txt | |
| 107 | 107 | commands = sphinx-build -n -W --keep-going -b html {env:DOCS_SOURCE} {env:DOCS_BUILD} | |
| 108 | 108 | ||
| 109 | 109 | [testenv:docs-serve] | |
| 110 | - description = | ||
| 110 | + description = | ||
| 111 | 111 | Builds and serves the HTML docs site locally. \ | |
| 112 | 112 | Use this for verifying updates to docs. \ | |
| 113 | 113 | Changes to docs files will be automatically rebuilt and served. | |
@@ -116,7 +116,7 @@ commands = sphinx-autobuild {env:DOCS_SOURCE} {env:DOCS_BUILD} --open-browser -- | |||
| 116 | 116 | ||
| 117 | 117 | [testenv:cover] | |
| 118 | 118 | commands = | |
| 119 | - pytest --cov --cov-report term --cov-report html \ | ||
| 119 | + pytest -p no:gitlab --cov --cov-report term --cov-report html \ | ||
| 120 | 120 | --cov-report xml tests/unit {posargs} | |
| 121 | 121 | ||
| 122 | 122 | [coverage:run] | |
@@ -133,16 +133,16 @@ exclude_lines = | |||
| 133 | 133 | [testenv:cli_func_v4] | |
| 134 | 134 | deps = -r{toxinidir}/requirements-docker.txt | |
| 135 | 135 | commands = | |
| 136 | - pytest --script-launch-mode=subprocess --cov --cov-report xml tests/functional/cli {posargs} | ||
| 136 | + pytest -p no:gitlab --script-launch-mode=subprocess --cov --cov-report xml tests/functional/cli {posargs} | ||
| 137 | 137 | ||
| 138 | 138 | [testenv:api_func_v4] | |
| 139 | 139 | deps = -r{toxinidir}/requirements-docker.txt | |
| 140 | 140 | commands = | |
| 141 | - pytest --cov --cov-report xml tests/functional/api {posargs} | ||
| 141 | + pytest -p no:gitlab --cov --cov-report xml tests/functional/api {posargs} | ||
| 142 | 142 | ||
| 143 | 143 | [testenv:smoke] | |
| 144 | 144 | deps = -r{toxinidir}/requirements-test.txt | |
| 145 | - commands = pytest tests/smoke {posargs} | ||
| 145 | + commands = pytest -p no:gitlab tests/smoke {posargs} | ||
| 146 | 146 | ||
| 147 | 147 | [testenv:pre-commit] | |
| 148 | 148 | skip_install = true | |
@@ -153,4 +153,4 @@ commands = pre-commit run --all-files --show-diff-on-failure | |||
| 153 | 153 | skip_install = true | |
| 154 | 154 | deps = -r{toxinidir}/requirements.txt | |
| 155 | 155 | -r{toxinidir}/requirements-test.txt | |
| 156 | - commands = pytest tests/install | ||
| 156 | + commands = pytest -p no:gitlab tests/install | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments