MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_get_user_uid_not_found

Function test_get_user_uid_not_found

testing/test_tmpdir.py:213–218  ·  view source on GitHub ↗

Test that get_user() function works even if the current process's user id does not correspond to a valid user (e.g. running pytest in a Docker container with 'docker run -u'.

()

Source from the content-addressed store, hash-verified

211@pytest.mark.usefixtures("break_getuser")
212@pytest.mark.skipif(sys.platform.startswith("win"), reason="no os.getuid on windows")
213def test_get_user_uid_not_found():
214 """Test that get_user() function works even if the current process's
215 user id does not correspond to a valid user (e.g. running pytest in a
216 Docker container with 'docker run -u'.
217 """
218 assert get_user() is None
219
220
221@pytest.mark.skipif(not sys.platform.startswith("win"), reason="win only")

Callers

nothing calls this directly

Calls 1

get_userFunction · 0.90

Tested by

no test coverage detected