Commit f866311d authored by Jason R. Coombs's avatar Jason R. Coombs

Add platform-specific code to override the home directory to honor bpo-36264. Fixes #2112.

parent 2187d0c7
......@@ -3,6 +3,7 @@ from __future__ import absolute_import
import sys
import os
import distutils.errors
import platform
from setuptools.extern import six
from setuptools.extern.six.moves import urllib, http_client
......@@ -285,7 +286,13 @@ class TestContentCheckers:
@pytest.fixture
def temp_home(tmpdir, monkeypatch):
monkeypatch.setitem(os.environ, 'HOME', str(tmpdir))
key = (
'USERPROFILE'
if platform.system() == 'Windows' and sys.version_info > (3, 8) else
'HOME'
)
monkeypatch.setitem(os.environ, key, str(tmpdir))
return tmpdir
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment