summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-03-12 15:39:57 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2019-03-12 15:39:57 (GMT)
commit25ec4a45dcc36c8087f93bd1634b311613244fc6 (patch)
tree1e5e08a4ee2c9f1625ad980528285cd7b3d4d5fd /Lib/distutils/tests
parent410aea1ebf2f56364369be3b477763ce78577c07 (diff)
downloadcpython-25ec4a45dcc36c8087f93bd1634b311613244fc6.zip
cpython-25ec4a45dcc36c8087f93bd1634b311613244fc6.tar.gz
cpython-25ec4a45dcc36c8087f93bd1634b311613244fc6.tar.bz2
bpo-36264: Don't honor POSIX HOME in os.path.expanduser on Windows (GH-12282)
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r--Lib/distutils/tests/test_config.py1
-rw-r--r--Lib/distutils/tests/test_dist.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_config.py b/Lib/distutils/tests/test_config.py
index 77ef788..344084a 100644
--- a/Lib/distutils/tests/test_config.py
+++ b/Lib/distutils/tests/test_config.py
@@ -60,6 +60,7 @@ class BasePyPIRCCommandTestCase(support.TempdirManager,
super(BasePyPIRCCommandTestCase, self).setUp()
self.tmp_dir = self.mkdtemp()
os.environ['HOME'] = self.tmp_dir
+ os.environ['USERPROFILE'] = self.tmp_dir
self.rc = os.path.join(self.tmp_dir, '.pypirc')
self.dist = Distribution()
diff --git a/Lib/distutils/tests/test_dist.py b/Lib/distutils/tests/test_dist.py
index 0a19f0f..cc34725 100644
--- a/Lib/distutils/tests/test_dist.py
+++ b/Lib/distutils/tests/test_dist.py
@@ -463,7 +463,7 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
# win32-style
if sys.platform == 'win32':
# home drive should be found
- os.environ['HOME'] = temp_dir
+ os.environ['USERPROFILE'] = temp_dir
files = dist.find_config_files()
self.assertIn(user_filename, files,
'%r not found in %r' % (user_filename, files))