[Python-checkins] bpo-38295: prevent test_relative_path of test_py_compile failure on macOS Catalina (GH-17636) (GH-17638)

Ned Deily webhook-mailer at python.org
Tue Dec 17 04:26:16 EST 2019


https://github.com/python/cpython/commit/5a9b69732ec19b04de459af890bcc26b83d979c5
commit: 5a9b69732ec19b04de459af890bcc26b83d979c5
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Ned Deily <nad at python.org>
date: 2019-12-17T04:26:11-05:00
summary:

bpo-38295: prevent test_relative_path of test_py_compile failure on macOS Catalina (GH-17636) (GH-17638)

(cherry picked from commit bf3aa1060a29a05813abbe877193af16e3e7131e)

Co-authored-by: Ned Deily <nad at python.org>

files:
A Misc/NEWS.d/next/macOS/2019-12-17-03-43-04.bpo-38295.hgDvlB.rst
M Lib/test/test_py_compile.py

diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
index 4a6caa571875d..5e35b8d8051f7 100644
--- a/Lib/test/test_py_compile.py
+++ b/Lib/test/test_py_compile.py
@@ -13,7 +13,7 @@
 class PyCompileTests(unittest.TestCase):
 
     def setUp(self):
-        self.directory = tempfile.mkdtemp()
+        self.directory = tempfile.mkdtemp(dir=os.getcwd())
         self.source_path = os.path.join(self.directory, '_test.py')
         self.pyc_path = self.source_path + 'c'
         self.cache_path = importlib.util.cache_from_source(self.source_path)
diff --git a/Misc/NEWS.d/next/macOS/2019-12-17-03-43-04.bpo-38295.hgDvlB.rst b/Misc/NEWS.d/next/macOS/2019-12-17-03-43-04.bpo-38295.hgDvlB.rst
new file mode 100644
index 0000000000000..cc9ceb4cc50b3
--- /dev/null
+++ b/Misc/NEWS.d/next/macOS/2019-12-17-03-43-04.bpo-38295.hgDvlB.rst
@@ -0,0 +1 @@
+Prevent failure of test_relative_path in test_py_compile on macOS Catalina.



More information about the Python-checkins mailing list