(monkeypatch)
| 185 | |
| 186 | @pytest.fixture |
| 187 | def break_getuser(monkeypatch): |
| 188 | monkeypatch.setattr("os.getuid", lambda: -1) |
| 189 | # taken from python 2.7/3.4 |
| 190 | for envvar in ("LOGNAME", "USER", "LNAME", "USERNAME"): |
| 191 | monkeypatch.delenv(envvar, raising=False) |
| 192 | |
| 193 | |
| 194 | @pytest.mark.usefixtures("break_getuser") |