Skip to content

Commit

Permalink
remove tests for PyEval_GetLocals
Browse files Browse the repository at this point in the history
  • Loading branch information
xuantengh committed Dec 31, 2024
1 parent dc40aaa commit 238bf47
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
13 changes: 0 additions & 13 deletions Lib/test/test_capi/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@ def method_example(self): ...
self.assertEqual(eval_get_func_desc(sum), "()") # c function
self.assertEqual(eval_get_func_desc(A), " object")

def test_eval_getlocals(self):
# Test PyEval_GetLocals()
x = 1
self.assertEqual(_testlimitedcapi.eval_getlocals(),
{'self': self,
'x': 1})

y = 2
self.assertEqual(_testlimitedcapi.eval_getlocals(),
{'self': self,
'x': 1,
'y': 2})

def test_eval_getglobals(self):
# Test PyEval_GetGlobals()
self.assertEqual(_testlimitedcapi.eval_getglobals(),
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_stable_abi_ctypes.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions Modules/_testlimitedcapi/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ eval_get_func_desc(PyObject *self, PyObject *func)
return PyUnicode_FromString(PyEval_GetFuncDesc(func));
}

static PyObject *
eval_getlocals(PyObject *module, PyObject *Py_UNUSED(args))
{
return Py_XNewRef(PyEval_GetLocals());
}

static PyObject *
eval_getglobals(PyObject *module, PyObject *Py_UNUSED(args))
{
Expand Down Expand Up @@ -76,7 +70,6 @@ eval_set_recursion_limit(PyObject *module, PyObject *args)
static PyMethodDef test_methods[] = {
{"eval_get_func_name", eval_get_func_name, METH_O, NULL},
{"eval_get_func_desc", eval_get_func_desc, METH_O, NULL},
{"eval_getlocals", eval_getlocals, METH_NOARGS},
{"eval_getglobals", eval_getglobals, METH_NOARGS},
{"eval_getbuiltins", eval_getbuiltins, METH_NOARGS},
{"eval_getframe", eval_getframe, METH_NOARGS},
Expand Down

0 comments on commit 238bf47

Please sign in to comment.