Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into PyLong_Sign-116560
  • Loading branch information
skirpichev authored Apr 15, 2024
commit a254dd3398ceab840ccb1cf12ae11148156cf83b
7 changes: 6 additions & 1 deletion Lib/test/test_capi/test_long.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,11 @@ def test_long_fromnativebytes(self):
self.assertEqual(expect_u, fromnativebytes(v_be, n, -1, 0),
f"PyLong_FromUnsignedNativeBytes(buffer, {n}, <native>)")

# Swap the unsigned request for tests and use the
# Py_ASNATIVEBYTES_UNSIGNED_BUFFER flag instead
self.assertEqual(expect_u, fromnativebytes(v_be, n, 4, 1),
f"PyLong_FromNativeBytes(buffer, {n}, <big|unsigned>)")

def test_long_sign(self):
# Test PyLong_Sign()
sign = _testcapi.pylong_sign
Expand All @@ -733,4 +738,4 @@ def test_long_sign(self):


if __name__ == "__main__":
unittest.main()
unittest.mai
You are viewing a condensed version of this merge commit. You can view the full changes here.