| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8f74a33 commit 0b2f6bc
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,6 +35,7 @@ repos: | |||
| 35 | 35 | - id: mypy | |
| 36 | 36 | args: [] | |
| 37 | 37 | additional_dependencies: | |
| 38 | + - pytest==7.1.3 | ||
| 38 | 39 | - types-PyYAML==6.0.12 | |
| 39 | 40 | - types-requests==2.28.11.2 | |
| 40 | 41 | - types-setuptools==64.0.1 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,9 +29,9 @@ warn_unused_ignores = true | |||
| 29 | 29 | module = [ | |
| 30 | 30 | "docs.*", | |
| 31 | 31 | "docs.ext.*", | |
| 32 | - "tests.*", | ||
| 33 | 32 | "tests.functional.*", | |
| 34 | 33 | "tests.functional.api.*", | |
| 34 | + "tests.meta.*", | ||
| 35 | 35 | "tests.unit.*", | |
| 36 | 36 | "tests.smoke.*" | |
| 37 | 37 | ] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,15 +1,18 @@ | |||
| 1 | + import pathlib | ||
| 2 | + | ||
| 3 | + import _pytest.config | ||
| 1 | 4 | import pytest | |
| 2 | 5 | ||
| 3 | 6 | import gitlab | |
| 4 | 7 | ||
| 5 | 8 | ||
| 6 | 9 | @pytest.fixture(scope="session") | |
| 7 | - def test_dir(pytestconfig): | ||
| 8 | - return pytestconfig.rootdir / "tests" | ||
| 10 | + def test_dir(pytestconfig: _pytest.config.Config) -> pathlib.Path: | ||
| 11 | + return pytestconfig.rootdir / "tests" # type: ignore | ||
| 9 | 12 | ||
| 10 | 13 | ||
| 11 | 14 | @pytest.fixture(autouse=True) | |
| 12 | - def mock_clean_config(monkeypatch): | ||
| 15 | + def mock_clean_config(monkeypatch: pytest.MonkeyPatch) -> None: | ||
| 13 | 16 | """Ensures user-defined environment variables do not interfere with tests.""" | |
| 14 | 17 | monkeypatch.delenv("PYTHON_GITLAB_CFG", raising=False) | |
| 15 | 18 | monkeypatch.delenv("GITLAB_PRIVATE_TOKEN", raising=False) | |
@@ -19,19 +22,19 @@ def mock_clean_config(monkeypatch): | |||
| 19 | 22 | ||
| 20 | 23 | ||
| 21 | 24 | @pytest.fixture(autouse=True) | |
| 22 | - def default_files(monkeypatch): | ||
| 25 | + def default_files(monkeypatch: pytest.MonkeyPatch) -> None: | ||
| 23 | 26 | """Ensures user configuration files do not interfere with tests.""" | |
| 24 | 27 | monkeypatch.setattr(gitlab.config, "_DEFAULT_FILES", []) | |
| 25 | 28 | ||
| 26 | 29 | ||
| 27 | 30 | @pytest.fixture | |
| 28 | - def valid_gitlab_ci_yml(): | ||
| 31 | + def valid_gitlab_ci_yml() -> str: | ||
| 29 | 32 | return """--- | |
| 30 | 33 | :test_job: | |
| 31 | 34 | :script: echo 1 | |
| 32 | 35 | """ | |
| 33 | 36 | ||
| 34 | 37 | ||
| 35 | 38 | @pytest.fixture | |
| 36 | - def invalid_gitlab_ci_yml(): | ||
| 39 | + def invalid_gitlab_ci_yml() -> str: | ||
| 37 | 40 | return "invalid" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments