]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41100: in test_platform, ignore 10.16 (GH-23485)
authorNed Deily <nad@python.org>
Tue, 24 Nov 2020 06:20:35 +0000 (01:20 -0500)
committerGitHub <noreply@github.com>
Tue, 24 Nov 2020 06:20:35 +0000 (01:20 -0500)
Lib/test/test_platform.py

index 9b6d93cb5fcda4a3851dbafd7674b072545c87c7..1590cd509b95c5b513e137a3d31c06454f0d5190 100644 (file)
@@ -238,7 +238,10 @@ class PlatformTest(unittest.TestCase):
             # On Snow Leopard, sw_vers reports 10.6.0 as 10.6
             if len_diff > 0:
                 expect_list.extend(['0'] * len_diff)
-            self.assertEqual(result_list, expect_list)
+            # For compatibility with older binaries, macOS 11.x may report
+            # itself as '10.16' rather than '11.x.y'.
+            if result_list != ['10', '16']:
+                self.assertEqual(result_list, expect_list)
 
             # res[1] claims to contain
             # (version, dev_stage, non_release_version)