diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-09-30 01:06:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-30 01:06:53 (GMT) |
commit | dbfc37a5f86196c642e63aee91be70752ad8604c (patch) | |
tree | dbf1f4daf5cc40c2e524b7df1e4fc83d4a3b8486 /Lib/test/test_posix.py | |
parent | dddae6647e6151fe2d35f1e46a32860da3b4c959 (diff) | |
download | cpython-dbfc37a5f86196c642e63aee91be70752ad8604c.zip cpython-dbfc37a5f86196c642e63aee91be70752ad8604c.tar.gz cpython-dbfc37a5f86196c642e63aee91be70752ad8604c.tar.bz2 |
[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 3e36e5aef18e326f5d1081d73ee8d8fefa1d82f8)
Co-authored-by: sobolevn <mail@sobolevn.me>
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r-- | Lib/test/test_posix.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 908354c..5d2decf 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -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): |