]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38295: prevent test_relative_path of test_py_compile failure on macOS Catalina...
authorNed Deily <nad@python.org>
Tue, 17 Dec 2019 09:05:41 +0000 (04:05 -0500)
committerGitHub <noreply@github.com>
Tue, 17 Dec 2019 09:05:41 +0000 (04:05 -0500)
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 d6677ab45ff509a4c39ae230183a31f114915d94..d4a68c9320d04f1bece7bab80630592d2bad0b6c 100644 (file)
@@ -51,7 +51,7 @@ class SourceDateEpochTestMeta(type(unittest.TestCase)):
 class PyCompileTestsBase:
 
     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.