Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0f23e84

Browse filesBrowse files
authored
gh-130317: Skip test_pack_unpack_roundtrip_for_nans() on x86 (#133155)
Reduce also the number of iterations from 1000 to 10 to ease debugging failures and prevent "command line too line" error when tests are re-run.
1 parent 6020260 commit 0f23e84
Copy full SHA for 0f23e84

File tree

Expand file treeCollapse file tree

1 file changed

+9
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-2
lines changed

‎Lib/test/test_capi/test_float.py

Copy file name to clipboardExpand all lines: Lib/test/test_capi/test_float.py
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,17 @@ def test_pack_unpack_roundtrip(self):
180180
self.assertEqual(value2, value)
181181

182182
@unittest.skipUnless(HAVE_IEEE_754, "requires IEEE 754")
183+
# Skip on x86 (32-bit), since these tests fail. The problem is that sNaN
184+
# doubles become qNaN doubles just by the C calling convention, there is no
185+
# way to preserve sNaN doubles between C function calls. But tests pass
186+
# on Windows x86.
187+
@unittest.skipIf((sys.maxsize == 2147483647) and not(sys.platform == 'win32'),
188+
'test fails on x86 (32-bit)')
183189
def test_pack_unpack_roundtrip_for_nans(self):
184190
pack = _testcapi.float_pack
185191
unpack = _testcapi.float_unpack
186-
for _ in range(1000):
192+
193+
for _ in range(10):
187194
for size in (2, 4, 8):
188195
sign = random.randint(0, 1)
189196
signaling = random.randint(0, 1)
@@ -203,7 +210,7 @@ def test_pack_unpack_roundtrip_for_nans(self):
203210
data1 = data if endian == BIG_ENDIAN else data[::-1]
204211
value = unpack(data1, endian)
205212
if signaling and sys.platform == 'win32':
206-
# On this platform sNaN becomes qNaN when returned
213+
# On Windows x86, sNaN becomes qNaN when returned
207214
# from function. That's a known bug, e.g.
208215
# https://developercommunity.visualstudio.com/t/155064
209216
# (see also gh-130317).

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.