]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41100: in test_platform, ignore 10.16 (GH-23485) (GH-23486)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 24 Nov 2020 06:34:16 +0000 (22:34 -0800)
committerGitHub <noreply@github.com>
Tue, 24 Nov 2020 06:34:16 +0000 (01:34 -0500)
(cherry picked from commit c0c23ea72b76b06b7db0d09415fa90bab8ded63a)

Co-authored-by: Ned Deily <nad@python.org>
Lib/test/test_platform.py

index bd953b5d677ef6fc440010f6f2ee8c790bb50002..a3b06feb6552ec6b87804dafb6b6236b88ce18d6 100644 (file)
@@ -237,7 +237,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)