(before: bool)
| 139 | |
| 140 | @pytest.mark.parametrize("before", [True, False]) |
| 141 | def test_setenv_deleted_meanwhile(before: bool) -> None: |
| 142 | key = "qwpeoip123" |
| 143 | if before: |
| 144 | os.environ[key] = "world" |
| 145 | monkeypatch = MonkeyPatch() |
| 146 | monkeypatch.setenv(key, "hello") |
| 147 | del os.environ[key] |
| 148 | monkeypatch.undo() |
| 149 | if before: |
| 150 | assert os.environ[key] == "world" |
| 151 | del os.environ[key] |
| 152 | else: |
| 153 | assert key not in os.environ |
| 154 | |
| 155 | |
| 156 | def test_delitem() -> None: |
nothing calls this directly
no test coverage detected