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:
Victor Stinner 2011-08-17 20:49:41 +02:00
parent c77239613b
commit 9c3de4a883
8 changed files with 48 additions and 52 deletions

View file

@ -2074,7 +2074,7 @@ def test_main():
])
if hasattr(socket, "socketpair"):
tests.append(BasicSocketPairTest)
if sys.platform == 'linux2':
if sys.platform.startswith('linux'):
tests.append(TestLinuxAbstractNamespace)
if isTipcAvailable():
tests.append(TIPCTest)