def test_get_user(monkeypatch):
    """Test that get_user() function works even if environment variables
    required by getpass module are missing from the environment on Windows
    (#1010).
    """
    monkeypatch.delenv("USER", raising=False)
    monkeypatch.delenv("USERNAME", raising=False)
    assert get_user() is None
Test that get_user() function works even if environment variables
    required by getpass module are missing from the environment on Windows
    (#1010).
    
testing/test_tmpdir.py