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'.
()
| 211 | @pytest.mark.usefixtures("break_getuser") |
| 212 | @pytest.mark.skipif(sys.platform.startswith("win"), reason="no os.getuid on windows") |
| 213 | def 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") |
nothing calls this directly
no test coverage detected