mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #12326: don't test the major version of sys.platform
Use startswith, instead of ==, when testing sys.platform to support new platforms like Linux 3 or OpenBSD 5.
This commit is contained in:
parent
c77239613b
commit
9c3de4a883
8 changed files with 48 additions and 52 deletions
|
@ -703,7 +703,7 @@ class GNUReadTest(LongnameTest):
|
|||
# Return True if the platform knows the st_blocks stat attribute and
|
||||
# uses st_blocks units of 512 bytes, and if the filesystem is able to
|
||||
# store holes in files.
|
||||
if sys.platform == "linux2":
|
||||
if sys.platform.startswith("linux"):
|
||||
# Linux evidentially has 512 byte st_blocks units.
|
||||
name = os.path.join(TEMPDIR, "sparse-test")
|
||||
with open(name, "wb") as fobj:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue