diff options
Diffstat (limited to 'Lib/test/test_platform.py')
| -rw-r--r-- | Lib/test/test_platform.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 7e3e401..9ecd5d9 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -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") |
