mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-76785: Add More Tests to test_interpreters.test_api (gh-117662)
In addition to the increase test coverage, this is a precursor to sorting out how we handle interpreters created directly via the C-API.
This commit is contained in:
parent
0cc71bde00
commit
993c3cca16
18 changed files with 2015 additions and 421 deletions
|
@ -6,9 +6,9 @@ static PyTypeObject _PyExc_InterpreterError = {
|
|||
.tp_name = "interpreters.InterpreterError",
|
||||
.tp_doc = PyDoc_STR("A cross-interpreter operation failed"),
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
|
||||
//.tp_traverse = ((PyTypeObject *)PyExc_BaseException)->tp_traverse,
|
||||
//.tp_clear = ((PyTypeObject *)PyExc_BaseException)->tp_clear,
|
||||
//.tp_base = (PyTypeObject *)PyExc_BaseException,
|
||||
//.tp_traverse = ((PyTypeObject *)PyExc_Exception)->tp_traverse,
|
||||
//.tp_clear = ((PyTypeObject *)PyExc_Exception)->tp_clear,
|
||||
//.tp_base = (PyTypeObject *)PyExc_Exception,
|
||||
};
|
||||
PyObject *PyExc_InterpreterError = (PyObject *)&_PyExc_InterpreterError;
|
||||
|
||||
|
@ -19,8 +19,8 @@ static PyTypeObject _PyExc_InterpreterNotFoundError = {
|
|||
.tp_name = "interpreters.InterpreterNotFoundError",
|
||||
.tp_doc = PyDoc_STR("An interpreter was not found"),
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
|
||||
//.tp_traverse = ((PyTypeObject *)PyExc_BaseException)->tp_traverse,
|
||||
//.tp_clear = ((PyTypeObject *)PyExc_BaseException)->tp_clear,
|
||||
//.tp_traverse = ((PyTypeObject *)PyExc_Exception)->tp_traverse,
|
||||
//.tp_clear = ((PyTypeObject *)PyExc_Exception)->tp_clear,
|
||||
.tp_base = &_PyExc_InterpreterError,
|
||||
};
|
||||
PyObject *PyExc_InterpreterNotFoundError = (PyObject *)&_PyExc_InterpreterNotFoundError;
|
||||
|
@ -61,7 +61,7 @@ _get_not_shareable_error_type(PyInterpreterState *interp)
|
|||
static int
|
||||
init_exceptions(PyInterpreterState *interp)
|
||||
{
|
||||
PyTypeObject *base = (PyTypeObject *)PyExc_BaseException;
|
||||
PyTypeObject *base = (PyTypeObject *)PyExc_Exception;
|
||||
|
||||
// builtin static types
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue