Test that tmp_path works even if environment variables required by getpass module are missing (#1010).
(pytester: Pytester, monkeypatch)
| 168 | |
| 169 | |
| 170 | def test_tmp_path_fallback_tox_env(pytester: Pytester, monkeypatch) -> None: |
| 171 | """Test that tmp_path works even if environment variables required by getpass |
| 172 | module are missing (#1010). |
| 173 | """ |
| 174 | monkeypatch.delenv("USER", raising=False) |
| 175 | monkeypatch.delenv("USERNAME", raising=False) |
| 176 | pytester.makepyfile( |
| 177 | """ |
| 178 | def test_some(tmp_path): |
| 179 | assert tmp_path.is_dir() |
| 180 | """ |
| 181 | ) |
| 182 | reprec = pytester.inline_run() |
| 183 | reprec.assertoutcome(passed=1) |
| 184 | |
| 185 | |
| 186 | @pytest.fixture |
nothing calls this directly
no test coverage detected