File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 3535 - id : mypy
3636 args : []
3737 additional_dependencies :
38+ - pytest==7.1.3
3839 - types-PyYAML==6.0.12
3940 - types-requests==2.28.11.2
4041 - types-setuptools==64.0.1
Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ warn_unused_ignores = true
2929module = [
3030 " docs.*" ,
3131 " docs.ext.*" ,
32- " tests.*" ,
3332 " tests.functional.*" ,
3433 " tests.functional.api.*" ,
34+ " tests.meta.*" ,
3535 " tests.unit.*" ,
3636 " tests.smoke.*"
3737]
Original file line number Diff line number Diff line change 1+ import pathlib
2+
3+ import _pytest .config
14import pytest
25
36import gitlab
47
58
69@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
912
1013
1114@pytest .fixture (autouse = True )
12- def mock_clean_config (monkeypatch ) :
15+ def mock_clean_config (monkeypatch : pytest . MonkeyPatch ) -> None :
1316 """Ensures user-defined environment variables do not interfere with tests."""
1417 monkeypatch .delenv ("PYTHON_GITLAB_CFG" , raising = False )
1518 monkeypatch .delenv ("GITLAB_PRIVATE_TOKEN" , raising = False )
@@ -19,19 +22,19 @@ def mock_clean_config(monkeypatch):
1922
2023
2124@pytest .fixture (autouse = True )
22- def default_files (monkeypatch ) :
25+ def default_files (monkeypatch : pytest . MonkeyPatch ) -> None :
2326 """Ensures user configuration files do not interfere with tests."""
2427 monkeypatch .setattr (gitlab .config , "_DEFAULT_FILES" , [])
2528
2629
2730@pytest .fixture
28- def valid_gitlab_ci_yml ():
31+ def valid_gitlab_ci_yml () -> str :
2932 return """---
3033:test_job:
3134 :script: echo 1
3235"""
3336
3437
3538@pytest .fixture
36- def invalid_gitlab_ci_yml ():
39+ def invalid_gitlab_ci_yml () -> str :
3740 return "invalid"
You can’t perform that action at this time.
0 commit comments