mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Use correct function name to PyArg_ParseTuple("is_package").
Fix off-by-1 error in normalize_line_endings(): when *p == '\0' the NUL was copied into q and q was auto-incremented, the loop was broken out of, then a newline was appended followed by a NUL. So the function, in effect, was strcpy() but added two extra chars which was caught by obmalloc in debug mode, since there was only room for 1 additional newline. Get test working under regrtest (added test_main).
This commit is contained in:
parent
946c19445c
commit
5c1ba53f8c
2 changed files with 6 additions and 6 deletions
|
|
@ -186,6 +186,9 @@ class CompressedZipImportTestCase(UncompressedZipImportTestCase):
|
|||
compression = ZIP_DEFLATED
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def test_main():
|
||||
test_support.run_unittest(UncompressedZipImportTestCase)
|
||||
test_support.run_unittest(CompressedZipImportTestCase)
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue