[Python-checkins] gh-99934: test_marshal.py: add more elements in test_deterministic_sets (GH-99935)

miss-islington webhook-mailer at python.org
Sat Dec 3 12:18:29 EST 2022


https://github.com/python/cpython/commit/4710a7589aee48bec9099af308bf5938285ba336
commit: 4710a7589aee48bec9099af308bf5938285ba336
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-12-03T09:18:23-08:00
summary:

gh-99934: test_marshal.py: add more elements in test_deterministic_sets (GH-99935)


Existing elements do produce different output on x86_64, but they
do not on x86. Let's make the data longer to ensure it differs.
(cherry picked from commit c68573b339320409b038501fdd7d4f8a56766275)

Co-authored-by: Alexander Kanavin <alex.kanavin at gmail.com>

files:
A Misc/NEWS.d/next/Tests/2022-12-01-18-55-18.gh-issue-99934.Ox3Fqf.rst
M Lib/test/test_marshal.py

diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py
index f5956fc3a15a..a1a91f661ba2 100644
--- a/Lib/test/test_marshal.py
+++ b/Lib/test/test_marshal.py
@@ -354,7 +354,7 @@ def test_deterministic_sets(self):
             for elements in (
                 "float('nan'), b'a', b'b', b'c', 'x', 'y', 'z'",
                 # Also test for bad interactions with backreferencing:
-                "('Spam', 0), ('Spam', 1), ('Spam', 2)",
+                "('Spam', 0), ('Spam', 1), ('Spam', 2), ('Spam', 3), ('Spam', 4), ('Spam', 5)",
             ):
                 s = f"{kind}([{elements}])"
                 with self.subTest(s):
diff --git a/Misc/NEWS.d/next/Tests/2022-12-01-18-55-18.gh-issue-99934.Ox3Fqf.rst b/Misc/NEWS.d/next/Tests/2022-12-01-18-55-18.gh-issue-99934.Ox3Fqf.rst
new file mode 100644
index 000000000000..1b1287c33dbd
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2022-12-01-18-55-18.gh-issue-99934.Ox3Fqf.rst
@@ -0,0 +1 @@
+Correct test_marsh on (32 bit) x86: test_deterministic sets was failing.



More information about the Python-checkins mailing list