Skip to content

Commit 3dd4c95

Browse files
committed
cleanup tests
1 parent 075b582 commit 3dd4c95

2 files changed

Lines changed: 1 addition & 28 deletions

File tree

Modules/_testcapimodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2658,7 +2658,7 @@ static PyMethodDef TestMethods[] = {
26582658
{"return_null_without_error", return_null_without_error, METH_NOARGS},
26592659
{"return_result_with_error", return_result_with_error, METH_NOARGS},
26602660
{"getitem_with_error", getitem_with_error, METH_VARARGS},
2661-
{"Py_CompileString", pycompilestring, METH_O},
2661+
{"Py_CompileString", pycompilestring, METH_O},
26622662
{"raise_SIGINT_then_send_None", raise_SIGINT_then_send_None, METH_VARARGS},
26632663
{"stack_pointer", stack_pointer, METH_NOARGS},
26642664
#ifdef W_STOPCODE

Modules/_testlimitedcapi/set.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
#include "pyconfig.h" // Py_GIL_DISABLED
2-
3-
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API)
4-
// Need limited C API for METH_FASTCALL
5-
#define Py_LIMITED_API 0x030d0000
6-
#endif
7-
81
#include "parts.h"
92
#include "util.h"
103

@@ -303,13 +296,11 @@ test_pyset_add_frozenset(PyObject *self, PyObject *Py_UNUSED(ignored))
303296
return raiseTestError("test_pyset_add_frozenset",
304297
"test object should be tracked");
305298
}
306-
Py_RETURN_NONE;
307299
if (PySet_Add(frozenset, tracked_obj) < 0) {
308300
Py_DECREF(frozenset);
309301
Py_DECREF(tracked_obj);
310302
return NULL;
311303
}
312-
313304
if (!PyObject_GC_IsTracked(frozenset)) {
314305
Py_DECREF(frozenset);
315306
Py_DECREF(tracked_obj);
@@ -366,24 +357,6 @@ test_set_contains_does_not_convert_unhashable_key(PyObject *self, PyObject *Py_U
366357
return NULL;
367358
}
368359

369-
// Interface to PySet_Add, returning the set
370-
static PyObject *
371-
pyset_add(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
372-
{
373-
if (nargs != 2) {
374-
PyErr_SetString(PyExc_TypeError,
375-
"pyset_add requires exactly 2 arguments");
376-
return NULL;
377-
}
378-
PyObject *set = args[0];
379-
PyObject *item = args[1];
380-
381-
int return_value = PySet_Add(set, item);
382-
if (return_value < 0) {
383-
return NULL;
384-
}
385-
return Py_NewRef(set);
386-
}
387360

388361
static PyMethodDef test_methods[] = {
389362
{"set_check", set_check, METH_O},

0 commit comments

Comments
 (0)