summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_capi.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-20891: Remove test_capi.test_bpo20891() (#5425)Victor Stinner2018-01-291-13/+0
| | | | | | | | | | My first fix is not enough to make test_bpo20891() reliable. A second fix is needed and it was decided to not backport it, so remove the test instead. For Python 3.6, the workaround is to call PyEval_InitThreads() before spawning the first C thread. Python 3.7 will have both fixes.
* bpo-20891: Skip test_embed.test_bpo20891() (#4967) (#4969)Victor Stinner2017-12-211-0/+3
| | | | | | | | Skip the test failing randomly because of known race condition. Skip the test to fix macOS buildbots until a decision is made on the proper fix for the race condition. (cherry picked from commit 550ee051d605b909dd75ef686d8e1244a0994394)
* bpo-20891: Fix PyGILState_Ensure() (#4650) (#4655)Victor Stinner2017-11-301-9/+37
| | | | | | | | | | | | | | | When PyGILState_Ensure() is called in a non-Python thread before PyEval_InitThreads(), only call PyEval_InitThreads() after calling PyThreadState_New() to fix a crash. Add an unit test in test_embed. Enhance also embedded tests, backport from master: * Add test_pre_initialization_api() * Set PYTHONIOENCODING environment variable in test_forced_io_encoding() (cherry picked from commit b4d1e1f7c1af6ae33f0e371576c8bcafedb099db)
* [3.6] bpo-30695: Add set_nomemory(start, stop) to _testcapi (GH-2406) (#4083)Miss Islington (bot)2017-10-231-1/+33
| | | (cherry picked from commit 85f643023fed3d4e2fb8e399f9ad57f3a65ef237)
* [3.6] bpo-30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords. ↵Serhiy Storchaka2017-05-041-18/+41
| | | | | (GH-1316). (#1441) (cherry picked from commit 5f161fd86dd5bb936a1a2a13391b13b7e59ec201)
* [3.6] bpo-30065: Fixed arguments validation in _posixsubprocess.fork_exec(). ↵Serhiy Storchaka2017-04-191-3/+3
| | | | | (GH-1110) (#1186) (cherry picked from commit 66bffd1)
* Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raisingSerhiy Storchaka2016-10-211-2/+2
| | | | | | | | new exception with setting current exception as __cause__. _PyErr_FormatFromCause(exception, format, args...) is equivalent to Python raise exception(format % args) from sys.exc_info()[1]
* Issue #28484: Skip tests if GIL is not used or multithreading is disabledMartin Panter2016-10-201-0/+1
|
* #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-5/+5
| | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* Issue #26282: PyArg_ParseTupleAndKeywords() and Argument Clinic now supportSerhiy Storchaka2016-06-091-0/+25
| | | | positional-only and keyword parameters in the same function.
* Issue #27076: Merge spelling from 3.5Martin Panter2016-05-261-1/+1
|\
| * Issue #27076: Doc, comment and tests spelling fixesMartin Panter2016-05-261-1/+1
| | | | | | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* | Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"Serhiy Storchaka2016-05-201-0/+3
|\ \ | |/ | | | | format unit.
| * Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"Serhiy Storchaka2016-05-201-0/+3
| | | | | | | | format unit.
* | Fail if PyMem_Malloc() is called without holding the GILVictor Stinner2016-03-161-4/+13
| | | | | | | | | | Issue #26563: Debug hooks on Python memory allocators now raise a fatal error if functions of the PyMem_Malloc() family are called without holding the GIL.
* | Issue #26564: Fix test_capiVictor Stinner2016-03-151-0/+2
| |
* | Check the GIL in PyObject_Malloc()Victor Stinner2016-03-141-9/+21
| | | | | | | | | | Issue #26558: The debug hook of PyObject_Malloc() now checks that the GIL is held when the function is called.
* | Issue #26516: Fix test_capi on AIXVictor Stinner2016-03-141-1/+1
| | | | | | | | Fix regex for parse a pointer address.
* | Issue #26516: Fix test_capi on 32-bit systemVictor Stinner2016-03-141-11/+9
| | | | | | | | On 32-bit system, only 4 bytes after dumped for the tail.
* | Issue #26516: Fix test_capi on WindowsVictor Stinner2016-03-141-4/+8
| | | | | | | | Pointers are formatted differently.
* | Add PYTHONMALLOC env varVictor Stinner2016-03-141-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | Issue #26516: * Add PYTHONMALLOC environment variable to set the Python memory allocators and/or install debug hooks. * PyMem_SetupDebugHooks() can now also be used on Python compiled in release mode. * The PYTHONMALLOCSTATS environment variable can now also be used on Python compiled in release mode. It now has no effect if set to an empty string. * In debug mode, debug hooks are now also installed on Python memory allocators when Python is configured without pymalloc.
* | Issue #26312: SystemError is now raised in all programming bugs with usingSerhiy Storchaka2016-02-111-2/+2
| | | | | | | | | | PyArg_ParseTupleAndKeywords(). RuntimeError did raised before in some programming bugs.
* | Issue #26198: ValueError is now raised instead of TypeError on bufferSerhiy Storchaka2016-02-071-2/+2
|/ | | | | overflow in parsing "es#" and "et#" format units. SystemError is now raised instead of TypeError on programmical error in parsing format string.
* Issue #26198: Fixed error messages for some argument parsing errors.Serhiy Storchaka2016-02-071-1/+1
| | | | | Fixed the documented about buffer overflow error for "es#" and "et#" format units.
* Issue #25800: Merge with 3.4Zachary Ware2015-12-051-1/+2
|\
| * Issue #25800: Fix running test_capi directlyZachary Ware2015-12-051-1/+2
| |
* | Issue #9517: Move script_helper to the support package.Berker Peksag2015-05-061-1/+1
| | | | | | | | Patch by Christie Wilson.
* | Issue #20586: Argument Clinic now ensures signatures on functions without ↵Zachary Ware2015-04-131-1/+5
| | | | | | | | docstrings.
* | Issue #23799: Added test.support.start_threads() for running and cleaning upSerhiy Storchaka2015-04-011-9/+5
|\ \ | |/ | | | | multiple threads.
| * Issue #23799: Added test.support.start_threads() for running and cleaning upSerhiy Storchaka2015-04-011-9/+5
| | | | | | | | multiple threads.
* | Issue #23571: Enhance _Py_CheckFunctionResult()Victor Stinner2015-03-241-4/+4
| | | | | | | | | | | | | | | | | | Too bad, sometimes Py_FatalError() is unable to write the exception into sys.stderr (on "AMD64 OpenIndiana 3.x" buildbot, the buildbot was probably out of memory). Call Py_FatalError() with a different message for the two cases (result+error, or no result and no error).
* | Issue #23571: Update test_capiVictor Stinner2015-03-241-2/+23
| |
* | Issue #23571: Fix test_capiVictor Stinner2015-03-211-2/+2
| |
* | Issue #23571: _Py_CheckFunctionResult() now gives the name of the functionVictor Stinner2015-03-211-0/+44
| | | | | | | | | | | | | | | | | | | | | | which returned an invalid result (result+error or no result without error) in the exception message. Add also unit test to check that the exception contains the name of the function. Special case: the final _PyEval_EvalFrameEx() check doesn't mention the function since it didn't execute a single function but a whole frame.
* | #22731 test_capi test fails because of mismatched newlinesSteve Dower2014-11-011-3/+4
| |
* | Issue #18093: fix test_capi test skip due to _testembed moveNick Coghlan2014-09-251-1/+1
| |
* | PEP 465: a dedicated infix operator for matrix multiplication (closes #21176)Benjamin Peterson2014-04-101-0/+17
| |
* | Issue #19977: Fix test_capi when LC_CTYPE locale is POSIXVictor Stinner2014-03-181-14/+18
|/
* Issue #20530: Argument Clinic's signature format has been revised again.Larry Hastings2014-02-091-4/+13
| | | | | | | The new syntax is highly human readable while still preventing false positives. The syntax also extends Python syntax to denote "self" and positional-only parameters, allowing inspect.Signature objects to be totally accurate for all supported builtins in Python 3.4.
* Issue #20532: Tests which use _testcapi now are marked as CPython only.Serhiy Storchaka2014-02-071-1/+2
|\
| * Issue #20532: Tests which use _testcapi now are marked as CPython only.Serhiy Storchaka2014-02-071-1/+2
| |
* | Issue #20326: Argument Clinic now uses a simple, unique signature toLarry Hastings2014-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | annotate text signatures in docstrings, resulting in fewer false positives. "self" parameters are also explicitly marked, allowing inspect.Signature() to authoritatively detect (and skip) said parameters. Issue #20326: Argument Clinic now generates separate checksums for the input and output sections of the block, allowing external tools to verify that the input has not changed (and thus the output is not out-of-date).
* | Issue #20189: Four additional builtin types (PyTypeObject,Larry Hastings2014-01-241-3/+3
| | | | | | | | | | | | PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type) have been modified to provide introspection information for builtins. Also: many additional Lib, test suite, and Argument Clinic fixes.
* | Fix inspect.signature tests for builtins when docstrings are compiled out.Larry Hastings2013-11-241-0/+3
| |
* | Issue #19674: inspect.signature() now produces a correct signatureLarry Hastings2013-11-231-0/+29
| | | | | | | | for some builtins.
* | Issue #18874: Implement the PEP 454 (tracemalloc)Victor Stinner2013-11-231-1/+1
| |
* | Issue #19440: Clean up test_capiZachary Ware2013-11-121-14/+8
|\ \ | |/
| * Issue #19440: Clean up test_capiZachary Ware2013-11-121-13/+7
| |
* | Close #19439: execute embedding tests on WindowsNick Coghlan2013-11-031-32/+46
| | | | | | | | Patch by Zachary Ware
* | Issue #16129: this should appease the buildbotsNick Coghlan2013-10-181-8/+7
| |