Lines Matching defs:test

2  * C Extension module to test Python interpreter C APIs.
5 * standard Python regression test, via Lib/test/test_capi.py.
40 # error "_testcapi must test the public Python C API, not CPython internal C API"
470 Note that the meat of the test is contained in testcapi_long.h.
472 exactly the same" code is needed to test long long, but the ubiquitous
478 file: if the test fails, you can set a breakpoint in the appropriate
541 is tested by test_long_api_inner. This test will concentrate on proper
705 long long is tested by test_long_api_inner. This test will
870 test overflow handling.
951 for both long and int arguments. The test may leak a little memory if
1187 return PyUnicode_FromString("<test>");
1209 const char DOC[] = "a test class";
1278 assert(strcmp(class_tp->tp_doc, "a test class") == 0);
1289 assert(strcmp(PyUnicode_AsUTF8(obj), "<test>") == 0);
1375 /* test PyArg_ParseTupleAndKeywords */
1392 /* test PyArg_ParseTupleAndKeywords keyword-only arguments */
1407 /* test PyArg_ParseTupleAndKeywords positional-only arguments */
2019 obj = PyUnicode_Decode("test", strlen("test"),
2032 "u code returned wrong value for u'test'");
2040 "u# code returned wrong values for u'test'");
2058 obj = PyUnicode_FromString("test");
2073 "Z code returned wrong value for 'test'");
2092 "Z# code returned wrong values for 'test'");
2461 /* Simple test of _PyLong_NumBits and _PyLong_Sign. */
3085 to test <wink>
3102 /* test Py_AddPendingCalls using threads */
3343 but it's fine for this test harness.
3403 static void print_delta(int test, struct timeval *s, struct timeval *e)
3411 printf("Test %d: %d.%06ds\n", test, (int)e->tv_sec, (int)e->tv_usec);
3524 /* To test the format of tracebacks as printed out. */
3542 /* To test the format of exceptions as printed out. */
3606 /* To test that the result of PyCode_NewEmpty has the right members. */
3622 Run via Lib/test/test_exceptions.py */
3773 cause an infinite loop. Run via Lib/test/test_capi.py */
3778 /* Using PyThreadState_Get() directly allows the test to pass in
3779 !pydebug mode. However, the test only actually tests anything
3794 /* only initialise 'cflags.cf_flags' to test backwards compatibility */
4044 descr.doc = "This is used to test for memory leaks in NewType";
5008 /* Deliberate bug to test debug hooks on Python memory allocators:
5083 /* This test would fail if run with the address sanitizer */
5105 /* Deliberate bug to test debug hooks on Python memory allocators:
5214 /* This is used in a test to check what happens if a signal arrives just
5397 // Since this uses `const char*` it is easier to test this in C:
5735 /* test Py_NewRef() */ \
5741 /* test Py_XNewRef() */ \
5783 /* test Py_Is() */ \
5787 /* test Py_None */ \
5791 /* test Py_True */ \
5796 /* test Py_False */ \
7894 "Class with normal (instance) methods to test calling conventions"),
7916 "Class with class methods to test calling conventions"),
7938 "Class with static methods to test calling conventions"),
7974 PyDoc_STR("a container value for test purposes")},
8017 /* don't use a name starting with "test", since we don't want
8143 /* bpo-41832: Add a new type to test PyType_FromSpec()