Skip to content

Commit bf3aa10

Browse files
authored
bpo-38295: prevent test_relative_path of test_py_compile failure on macOS Catalina (GH-17636)
1 parent d21ad67 commit bf3aa10

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/test/test_py_compile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __new__(mcls, name, bases, dct, *, source_date_epoch):
5151
class PyCompileTestsBase:
5252

5353
def setUp(self):
54-
self.directory = tempfile.mkdtemp()
54+
self.directory = tempfile.mkdtemp(dir=os.getcwd())
5555
self.source_path = os.path.join(self.directory, '_test.py')
5656
self.pyc_path = self.source_path + 'c'
5757
self.cache_path = importlib.util.cache_from_source(self.source_path)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Prevent failure of test_relative_path in test_py_compile on macOS Catalina.

0 commit comments

Comments
 (0)