summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tarfile.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-08-17 18:49:41 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-08-17 18:49:41 (GMT)
commit9c3de4a88357cef2753d30c816a238bd74f39273 (patch)
treec799cb6ebcd0ec62801a275291e4f8b0ca9846d0 /Lib/test/test_tarfile.py
parentc77239613ba08878f07fac5e23ea60fbcf386a06 (diff)
downloadcpython-9c3de4a88357cef2753d30c816a238bd74f39273.zip
cpython-9c3de4a88357cef2753d30c816a238bd74f39273.tar.gz
cpython-9c3de4a88357cef2753d30c816a238bd74f39273.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r--Lib/test/test_tarfile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 38a5027..034765c 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -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: