mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-36264: Don't honor POSIX HOME in os.path.expanduser on Windows (GH-12282)
This commit is contained in:
parent
410aea1ebf
commit
25ec4a45dc
6 changed files with 17 additions and 14 deletions
|
@ -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()
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue