Skip to content

Commit 29c4c2e

Browse files
committed
fix: remove test_ prefix for functions in _testcapi
1 parent a06b349 commit 29c4c2e

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

Lib/test/test_structseq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ def test_newtype_rejects_negative_n_in_sequence(self):
1515
# gh-154387: n_in_sequence must not be negative.
1616
_testcapi = import_helper.import_module("_testcapi")
1717
with self.assertRaises(SystemError):
18-
_testcapi.test_structseq_newtype_negative_n_in_sequence()
18+
_testcapi.structseq_newtype_negative_n_in_sequence()
1919

2020
def test_newtype_rejects_unnamed_hidden_field(self):
2121
# gh-154387: an unnamed field must be a visible sequence field.
2222
_testcapi = import_helper.import_module("_testcapi")
2323
with self.assertRaises(SystemError):
24-
_testcapi.test_structseq_newtype_unnamed_hidden_field()
24+
_testcapi.structseq_newtype_unnamed_hidden_field()
2525

2626
def test_newtype_rejects_n_in_sequence_over_n_fields(self):
2727
# gh-154387: n_in_sequence must not exceed the number of fields.
2828
_testcapi = import_helper.import_module("_testcapi")
2929
with self.assertRaises(SystemError):
30-
_testcapi.test_structseq_newtype_too_many_visible_fields()
30+
_testcapi.structseq_newtype_too_many_visible_fields()
3131

3232
def test_tuple(self):
3333
t = time.gmtime()

Modules/_testcapimodule.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ test_structseq_newtype_null_descr_doc(PyObject *Py_UNUSED(self),
13051305
}
13061306

13071307
static PyObject *
1308-
test_structseq_newtype_negative_n_in_sequence(PyObject *Py_UNUSED(self),
1308+
structseq_newtype_negative_n_in_sequence(PyObject *Py_UNUSED(self),
13091309
PyObject *Py_UNUSED(args))
13101310
{
13111311
// gh-154387: n_in_sequence must not be negative.
@@ -1329,7 +1329,7 @@ test_structseq_newtype_negative_n_in_sequence(PyObject *Py_UNUSED(self),
13291329
}
13301330

13311331
static PyObject *
1332-
test_structseq_newtype_unnamed_hidden_field(PyObject *Py_UNUSED(self),
1332+
structseq_newtype_unnamed_hidden_field(PyObject *Py_UNUSED(self),
13331333
PyObject *Py_UNUSED(args))
13341334
{
13351335
// gh-154387: an unnamed field is only allowed among the visible sequence
@@ -1355,7 +1355,7 @@ test_structseq_newtype_unnamed_hidden_field(PyObject *Py_UNUSED(self),
13551355
}
13561356

13571357
static PyObject *
1358-
test_structseq_newtype_too_many_visible_fields(PyObject *Py_UNUSED(self),
1358+
structseq_newtype_too_many_visible_fields(PyObject *Py_UNUSED(self),
13591359
PyObject *Py_UNUSED(args))
13601360
{
13611361
// gh-154387: n_in_sequence must not exceed the total number of fields.
@@ -3082,12 +3082,12 @@ static PyMethodDef TestMethods[] = {
30823082
test_structseq_newtype_doesnt_leak, METH_NOARGS},
30833083
{"test_structseq_newtype_null_descr_doc",
30843084
test_structseq_newtype_null_descr_doc, METH_NOARGS},
3085-
{"test_structseq_newtype_negative_n_in_sequence",
3086-
test_structseq_newtype_negative_n_in_sequence, METH_NOARGS},
3087-
{"test_structseq_newtype_unnamed_hidden_field",
3088-
test_structseq_newtype_unnamed_hidden_field, METH_NOARGS},
3089-
{"test_structseq_newtype_too_many_visible_fields",
3090-
test_structseq_newtype_too_many_visible_fields, METH_NOARGS},
3085+
{"structseq_newtype_negative_n_in_sequence",
3086+
structseq_newtype_negative_n_in_sequence, METH_NOARGS},
3087+
{"structseq_newtype_unnamed_hidden_field",
3088+
structseq_newtype_unnamed_hidden_field, METH_NOARGS},
3089+
{"structseq_newtype_too_many_visible_fields",
3090+
structseq_newtype_too_many_visible_fields, METH_NOARGS},
30913091
{"pyobject_repr_from_null", pyobject_repr_from_null, METH_NOARGS},
30923092
{"pyobject_str_from_null", pyobject_str_from_null, METH_NOARGS},
30933093
{"pyobject_bytes_from_null", pyobject_bytes_from_null, METH_NOARGS},

0 commit comments

Comments
 (0)