mirror of
https://github.com/python/cpython.git
synced 2025-09-18 06:30:38 +00:00
[3.13] gh-123797: Check for runtime availability of ptsname_r
on macos (GH-123806) (#124270)
gh-123797: Check for runtime availability of `ptsname_r` on macos (GH-123806)
(cherry picked from commit 3e36e5aef1
)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
dddae6647e
commit
dbfc37a5f8
3 changed files with 44 additions and 10 deletions
|
@ -2140,6 +2140,13 @@ class TestPosixWeaklinking(unittest.TestCase):
|
|||
with self.assertRaisesRegex(NotImplementedError, "dir_fd unavailable"):
|
||||
os.stat("file", dir_fd=0)
|
||||
|
||||
def test_ptsname_r(self):
|
||||
self._verify_available("HAVE_PTSNAME_R")
|
||||
if self.mac_ver >= (10, 13, 4):
|
||||
self.assertIn("HAVE_PTSNAME_R", posix._have_functions)
|
||||
else:
|
||||
self.assertNotIn("HAVE_PTSNAME_R", posix._have_functions)
|
||||
|
||||
def test_access(self):
|
||||
self._verify_available("HAVE_FACCESSAT")
|
||||
if self.mac_ver >= (10, 10):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue