Skip to content

Commit 962434c

Browse files
committed
Add testcases written in C
1 parent fac5b77 commit 962434c

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

Lib/test/test_clinic_functionality.py

+5
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ def test_gh_32092_kw_pass(self):
1414
res = ac_tester.gh_32092_kw_pass(1, 2, 3)
1515
expect = (1, (2, 3), None)
1616
self.assertEqual(res, expect)
17+
18+
19+
class TestClinicFunctionalityC(unittest.TestCase):
20+
locals().update((name, getattr(ac_tester, name))
21+
for name in dir(ac_tester) if name.startswith('test_'))

Modules/_testclinicfunctionality.c

+13
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ module _testclinicfunctionality
1616
[clinic start generated code]*/
1717
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=19bd80db1aefb188]*/
1818

19+
/*[clinic input]
20+
test_empty_function
21+
22+
[clinic start generated code]*/
23+
24+
static PyObject *
25+
test_empty_function_impl(PyObject *module)
26+
/*[clinic end generated code: output=0f8aeb3ddced55cb input=0dd7048651ad4ae4]*/
27+
{
28+
Py_RETURN_NONE;
29+
};
30+
1931
/*[clinic input]
2032
gh_32092_oob
2133
@@ -81,6 +93,7 @@ gh_32092_kw_pass_impl(PyObject *module, PyObject *pos, PyObject *args,
8193
}
8294

8395
static PyMethodDef tester_methods[] = {
96+
TEST_EMPTY_FUNCTION_METHODDEF
8497
GH_32092_OOB_METHODDEF
8598
GH_32092_KW_PASS_METHODDEF
8699
{NULL, NULL}

Modules/clinic/_testclinicfunctionality.c.h

+18-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)