mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684)
This commit is contained in:
parent
f85af035c5
commit
2a9b8babf0
4 changed files with 23 additions and 13 deletions
|
@ -260,7 +260,6 @@ class PlatformTest(unittest.TestCase):
|
|||
self.assertEqual(sts, 0)
|
||||
|
||||
def test_libc_ver(self):
|
||||
import os
|
||||
if os.path.isdir(sys.executable) and \
|
||||
os.path.exists(sys.executable+'.exe'):
|
||||
# Cygwin horror
|
||||
|
@ -269,6 +268,13 @@ class PlatformTest(unittest.TestCase):
|
|||
executable = sys.executable
|
||||
res = platform.libc_ver(executable)
|
||||
|
||||
self.addCleanup(support.unlink, support.TESTFN)
|
||||
with open(support.TESTFN, 'wb') as f:
|
||||
f.write(b'x'*(16384-10))
|
||||
f.write(b'GLIBC_1.23.4\0GLIBC_1.9\0GLIBC_1.21\0')
|
||||
self.assertEqual(platform.libc_ver(support.TESTFN),
|
||||
('glibc', '1.23.4'))
|
||||
|
||||
def test_popen(self):
|
||||
mswindows = (sys.platform == "win32")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue