(monkeypatch: pytest.MonkeyPatch, env_value: str | None, expected: str)
| 15 | ], |
| 16 | ) |
| 17 | def test_subprocess_keyring_provider(monkeypatch: pytest.MonkeyPatch, env_value: str | None, expected: str) -> None: |
| 18 | if env_value is not None: |
| 19 | monkeypatch.setenv("PIP_KEYRING_PROVIDER", env_value) |
| 20 | else: |
| 21 | monkeypatch.delenv("PIP_KEYRING_PROVIDER", raising=False) |
| 22 | |
| 23 | result = run_subprocess([sys.executable, "-c", "import os; print(os.environ['PIP_KEYRING_PROVIDER'])"]) |
| 24 | |
| 25 | assert result.stdout.strip() == expected |
| 26 | |
| 27 | |
| 28 | def test_subprocess_pythonsafepath_set_for_python_commands() -> None: |
nothing calls this directly
no test coverage detected