summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_capi/test_long.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-130824: Add tests for `NULL` in `PyLong_*AndOverflow` functions ↵Miss Islington (bot)2025-03-051-3/+2
| | | | | | | | | (GH-130828) (GH-130869) (cherry picked from commit 90130807d9c5a55b2a64024f5dfbee4785b9a27c) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.13] Refactor test_capi.test_long (GH-122113) (GH-122137)Miss Islington (bot)2024-07-231-179/+66
| | | | | | | Share common code for tests for PyLong_As*() functions. (cherry picked from commit 69f2dc5c06e62b4a9eb4da8f0cd456cc09b998ed) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-121115: Skip __index__ in PyLong_AsNativeBytes by default (GH-121118)Miss Islington (bot)2024-06-281-2/+9
| | | | | (cherry picked from commit 2894aa14f22430e9b6d4676afead6da7c79209ca) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-111140: PyLong_From/AsNativeBytes: Take *flags* rather than just ↵Steve Dower2024-04-051-7/+111
| | | | *endianness* (GH-116053)
* gh-117021: Fix integer overflow in PyLong_AsPid() on non-Windows 64-bit ↵Serhiy Storchaka2024-03-201-0/+28
| | | | platforms (GH-117064)
* gh-116417: Move limited C API long.c tests to _testlimitedcapi (#117001)Victor Stinner2024-03-191-20/+21
| | | | | | | * Split long.c tests of _testcapi into two parts: limited C API tests in _testlimitedcapi and non-limited C API tests in _testcapi. * Move testcapi_long.h from Modules/_testcapi/ to Modules/_testlimitedcapi/. * Add MODULE__TESTLIMITEDCAPI_DEPS to Makefile.pre.in.
* gh-111140: Improve PyLong_AsNativeBytes API doc example & improve the test ↵Gregory P. Smith2024-02-221-5/+25
| | | | | | | | | (#115380) This expands the examples to cover both realistic use cases for the API. I noticed thing in the test that could be done better so I added those as well: We need to guarantee that all bytes of the result are overwritten and that too many are not written. Tests now pre-fills the result with data in order to ensure that. Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* gh-111140: Adds PyLong_AsNativeBytes and PyLong_FromNative[Unsigned]Bytes ↵Steve Dower2024-02-121-0/+145
| | | | functions (GH-114886)
* gh-110628: Add tests for PyLong C API (GH-110629)Serhiy Storchaka2023-10-141-17/+376
|
* gh-108444: Add PyLong_AsInt() public function (#108445)Victor Stinner2023-08-241-0/+30
| | | | | | * Rename _PyLong_AsInt() to PyLong_AsInt(). * Add documentation. * Add test. * For now, keep _PyLong_AsInt() as an alias to PyLong_AsInt().
* GH-101291: Add low level, unstable API for pylong (GH-101685)Mark Shannon2023-05-211-0/+39
Co-authored-by: Petr Viktorin <encukou@gmail.com>