Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit81eefa7

Browse files
authored
test_config: get the last PyConfig member (#135)
1 parent4c53701 commit81eefa7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎tests/test_pythoncapi_compat_cext.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,6 +2148,15 @@ test_config(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
21482148
assert(PyLong_Check(obj));
21492149
Py_DECREF(obj);
21502150

2151+
// Get the last member
2152+
#if0x030A0000 <=PY_VERSION_HEX
2153+
obj=PyConfig_Get("warn_default_encoding");
2154+
#else
2155+
obj=PyConfig_Get("user_site_directory");
2156+
#endif
2157+
assert(PyLong_Check(obj));
2158+
Py_DECREF(obj);
2159+
21512160
assert(PyConfig_Get("nonexistent")==NULL);
21522161
assert(PyErr_ExceptionMatches(PyExc_ValueError));
21532162
PyErr_Clear();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp