
I've been doing a bunch of testing using the regression tests and have tried to improve the test coverage. I've made some progress. Overall, the regression tests do a pretty good job. Below are all the functions that are not currently covered by the regression tests in Objects/ Parser/ and Python/ (Modules/ has too many at this point). This list may not be perfect, but should be pretty close (some tests failed: test_new, test_funcattrs, and test_symtable). I don't know how many of these can be reached from within the python (interpreter), some may only be callable from C code which embeds python. After improving test coverage, I'll go back and run purify to see if there are any new memory leaks. Sorry, the list is kinda long. Let me know if there's a better way to distribute this info. Neal -- Objects/abstract.c PyObject_CallMethodObjArgs PyObject_CallFunctionObjArgs PyObject_Type PyObject_Length PyObject_AsWriteBuffer PyNumber_InPlaceTrueDivide PySequence_Length PySequence_In PySequence_InPlaceConcat PySequence_InPlaceRepeat PyMapping_Length PyMapping_HasKeyString PyMapping_HasKey PyMapping_GetItemString PyMapping_SetItemString null_error sliceobj_from_intint objargs_mktuple Objects/bufferobject.c PyBuffer_FromReadWriteObject PyBuffer_FromReadWriteMemory PyBuffer_New buffer_compare buffer_getwritebuf Objects/cellobject.c cell_compare cell_repr Objects/classobject.c instance_ass_item PyMethod_Function PyMethod_Self PyMethod_Class set_slot set_attr_slots set_dict set_bases set_name instancemethod_hash Objects/cobject.c PyCObject_FromVoidPtrAndDesc PyCObject_GetDesc PyCObject_Import Objects/complexobject.c PyComplex_FromDoubles complex_print complex_div Objects/descrobject.c member_repr getset_repr wrapper_repr method_get_doc wrapper_get_doc proxy_len proxy_has_key proxy_get proxy_values proxy_items proxy_copy proxy_getiter proxy_str proxy_traverse wrapper_name Objects/dictobject.c PyDict_Values PyDict_Items dictiter_next Objects/fileobject.c PyFile_FromString PyFile_Name Objects/floatobject.c PyFloat_AsString PyFloat_AsStringEx float_print Objects/funcobject.c PyFunction_GetCode PyFunction_GetGlobals PyFunction_GetDefaults PyFunction_GetClosure PyClassMethod_New func_set_code func_set_defaults Objects/iterobject.c iter_traverse iter_next calliter_traverse calliter_next Objects/listobject.c list_print immutable_list_op immutable_list_ass Objects/longobject.c PyLong_AsVoidPtr Objects/methodobject.c listmethodchain PyCFunction_GetFunction PyCFunction_GetSelf PyCFunction_GetFlags meth_traverse meth_get__self__ meth_compare Objects/object.c _PyObject_Dump PyObject_Not PyObject_Malloc PyObject_Realloc PyObject_Free none_dealloc NotImplemented_repr Objects/rangeobject.c range_compare range_slice range_tolist range_getattr Objects/sliceobject.c PySlice_GetIndices slice_compare Objects/stringobject.c _Py_ReleaseInternedStrings PyString_Decode PyString_Encode PyString_AsEncodedString PyString_AsDecodedString string_getbuffer string_buffer_getwritebuf Objects/structseq.c structseq_repr structseq_concat structseq_repeat structseq_contains structseq_hash Objects/tupleobject.c tupleprint Objects/typeobject.c slot_nb_coerce type_set_module type_subclasses wrap_binaryfunc_r wrap_coercefunc wrap_ternaryfunc_r wrap_sq_delitem wrap_delslice wrap_delitem wrap_hashfunc slot_sq_length slot_sq_ass_item slot_tp_iter slot_tp_iternext super_repr Objects/unicodeobject.c PyUnicodeUCS2_Replace PyUnicodeUCS2_AsUnicode PyUnicodeUCS2_GetSize PyUnicodeUCS2_FromWideChar PyUnicodeUCS2_AsWideChar PyUnicodeUCS2_SetDefaultEncoding PyUnicodeUCS2_Encode PyUnicodeUCS2_AsUTF16String PyUnicodeUCS2_AsUnicodeEscapeString PyUnicodeUCS2_AsRawUnicodeEscapeString PyUnicodeUCS2_AsCharmapString PyUnicodeUCS2_Translate PyUnicodeUCS2_Tailmatch PyUnicodeUCS2_Find utf8_decoding_error utf16_decoding_error latin1_encoding_error charmap_encoding_error unicode_index unicode_rindex unicode_buffer_getreadbuf unicode_buffer_getwritebuf Objects/weakrefobject.c PyWeakref_GetObject gc_clear weakref_repr proxy_print proxy_repr proxy_compare proxy_nonzero proxy_slice proxy_ass_slice proxy_contains proxy_length proxy_setitem Parser/bitset.c _Py_delbitset Parser/grammar1.c PyGrammar_LabelRepr Parser/listnode.c list1node PyNode_ListTree listnode Parser/myreadline.c PyOS_StdioReadline PyOS_Readline my_fgets Parser/parsetok.c PyParser_ParseString Parser/pgen.c dumpstate dumpnfa printssdfa Parser/pgenmain.c PySys_WriteStderr Py_FatalError PyOS_Readline Parser/tokenizer.c indenterror Python/ceval.c call_exc_trace PyEval_CallObject Py_SetRecursionLimit Py_GetRecursionLimit PyEval_AcquireLock PyEval_ReleaseThread loop_subscript gen_traverse gen_next Python/codecs.c PyCodec_StreamReader PyCodec_StreamWriter build_stream_codec Python/compile.c PyCode_Addr2Line PyNode_CompileSymtable code_repr do_pad dump Python/errors.c PyErr_WriteUnraisable PyErr_BadArgument PyErr_NoMemory PyErr_BadInternalCall _PyErr_BadInternalCall Python/frozenmain.c Py_FrozenMain Python/getargs.c PyArg_VaParse Python/import.c PyImport_ExtendInittab PyImport_ExecCodeModule PyImport_AppendInittab get_frozen_object imp_init_builtin imp_init_frozen imp_get_frozen_object imp_is_builtin imp_is_frozen imp_load_compiled imp_load_dynamic imp_load_module imp_load_package Python/marshal.c PyMarshal_ReadShortFromFile PyMarshal_ReadObjectFromFile w_more marshal_dump marshal_load Python/modsupport.c PyEval_CallFunction _ustrlen Python/pyfpe.c PyFPE_dummy Python/pystate.c PyInterpreterState_Head PyInterpreterState_Next PyInterpreterState_ThreadHead PyThreadState_Next Python/pythonrun.c Py_NewInterpreter PyRun_InteractiveLoopFlags PyRun_InteractiveOneFlags parse_syntax_error print_error_text PyErr_Display Py_FatalError Py_SetPythonHome Py_EndInterpreter PyRun_AnyFile PyRun_AnyFileEx PyRun_AnyFileFlags PyRun_SimpleString PyRun_SimpleStringFlags PyRun_SimpleFile PyRun_SimpleFileEx PyRun_InteractiveOne PyRun_InteractiveLoop PyRun_File PyRun_FileFlags Py_CompileString Py_SymtableString PyErr_Print Py_AtExit run_pyc_file add_flag Python/structmember.c PyMember_Set listmembers Python/symtable.c ste_repr Python/sysmodule.c mywrite PySys_WriteStdout PySys_WriteStderr PySys_GetFile PySys_AddWarnOption sys_excepthook sys_getdefaultencoding sys_setdefaultencoding sys_setcheckinterval sys_setrecursionlimit sys_getrecursionlimit sys_setdlopenflags sys_getdlopenflags Python/thread.c PyThread_allocate_sema PyThread_free_sema PyThread_down_sema PyThread_up_sema PyThread__exit_thread Python/traceback.c tb_displayline PyTraceBack_Print tb_clear tb_printinternal

Neal Norwitz writes:
I've added a few tests for the weakref support that should at least improve the coverage there. I don't think I'll have any more time to help in this effort before 2.2 goes out, but I think this is really important.
I can live with this distribution method; if it gets us to actually improve coverage, we all get to see the benefit of a shorter list. ;-) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation

Neal Norwitz writes:
I've added a few tests for the weakref support that should at least improve the coverage there. I don't think I'll have any more time to help in this effort before 2.2 goes out, but I think this is really important.
I can live with this distribution method; if it gets us to actually improve coverage, we all get to see the benefit of a shorter list. ;-) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation
participants (2)
-
Fred L. Drake, Jr.
-
Neal Norwitz