(before: bool)
| 164 | |
| 165 | @pytest.mark.parametrize("before", [True, False]) |
| 166 | def test_setenv_deleted_meanwhile(before: bool) -> None: |
| 167 | key = "qwpeoip123" |
| 168 | if before: |
| 169 | os.environ[key] = "world" |
| 170 | monkeypatch = MonkeyPatch() |
| 171 | monkeypatch.setenv(key, "hello") |
| 172 | del os.environ[key] |
| 173 | monkeypatch.undo() |
| 174 | if before: |
| 175 | assert os.environ[key] == "world" |
| 176 | del os.environ[key] |
| 177 | else: |
| 178 | assert key not in os.environ |
| 179 | |
| 180 | |
| 181 | def test_delitem() -> None: |
nothing calls this directly
no test coverage detected