MCPcopy Index your code
hub / github.com/pytest-dev/pytest / test_get_user_uid_not_found

Function test_get_user_uid_not_found

testing/test_tmpdir.py:417–422  ·  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

415@pytest.mark.usefixtures("break_getuser")
416@pytest.mark.skipif(sys.platform.startswith("win"), reason="no os.getuid on windows")
417def test_get_user_uid_not_found():
418 """Test that get_user() function works even if the current process's
419 user id does not correspond to a valid user (e.g. running pytest in a
420 Docker container with 'docker run -u'.
421 """
422 assert get_user() is None
423
424
425@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

Used in the wild real call sites across dependent graphs

searching dependent graphs…