]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38295: prevent test_relative_path of test_py_compile failure on macOS Catalina...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 17 Dec 2019 09:26:11 +0000 (01:26 -0800)
committerNed Deily <nad@python.org>
Tue, 17 Dec 2019 09:26:11 +0000 (04:26 -0500)
(cherry picked from commit bf3aa1060a29a05813abbe877193af16e3e7131e)

Co-authored-by: Ned Deily <nad@python.org>
Lib/test/test_py_compile.py
Misc/NEWS.d/next/macOS/2019-12-17-03-43-04.bpo-38295.hgDvlB.rst [new file with mode: 0644]

index 4a6caa571875d7705dfa2925604116499b12e399..5e35b8d8051f7a454589ccb2019f77d6c75a0159 100644 (file)
@@ -13,7 +13,7 @@ from test import support
 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 (file)
index 0000000..cc9ceb4
--- /dev/null
@@ -0,0 +1 @@
+Prevent failure of test_relative_path in test_py_compile on macOS Catalina.