Use temproot as a fallback if the current user couldn't be obtained

This commit is contained in:
Bruno Oliveira
2015-09-16 16:42:07 -03:00
parent 558e5406e8
commit 130e6cf8a2
2 changed files with 11 additions and 8 deletions

View File

@@ -145,4 +145,4 @@ def test_get_user(monkeypatch):
from _pytest.tmpdir import get_user
monkeypatch.delenv('USER', raising=False)
monkeypatch.delenv('USERNAME', raising=False)
assert get_user() == 'tox'
assert get_user() is None