Skip to content

Commit

Permalink
Use "old" os.path when making temporary directory
Browse files Browse the repository at this point in the history
File this under "not sure how this ever worked"... as debugged in #160.
  • Loading branch information
sampsyo committed Oct 14, 2023
1 parent 7e8f42f commit d8c649e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/test_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class FakeSystem(unittest.TestCase):
TMP_HOME = False

def setUp(self):
if self.TMP_HOME:
self.home = tempfile.mkdtemp()

if self.SYS_NAME in SYSTEMS:
self.os_path = os.path
os.environ = {}
Expand All @@ -41,7 +44,6 @@ def setUp(self):
platform.system = lambda: self.SYS_NAME

if self.TMP_HOME:
self.home = tempfile.mkdtemp()
os.environ['HOME'] = self.home
os.environ['USERPROFILE'] = self.home

Expand Down

0 comments on commit d8c649e

Please sign in to comment.