summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipimport.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-02-17 18:05:20 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2003-02-17 18:05:20 (GMT)
commit5c1ba53f8ca219a22d964324abb76a055ad19feb (patch)
treee1778b086fc50fbfd794660240afd6962d3424b7 /Lib/test/test_zipimport.py
parent946c19445c902d68ccd75452b97a8098e9b212e5 (diff)
downloadcpython-5c1ba53f8ca219a22d964324abb76a055ad19feb.zip
cpython-5c1ba53f8ca219a22d964324abb76a055ad19feb.tar.gz
cpython-5c1ba53f8ca219a22d964324abb76a055ad19feb.tar.bz2
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).
Diffstat (limited to 'Lib/test/test_zipimport.py')
-rw-r--r--Lib/test/test_zipimport.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py
index 3c9457f..c9aff4a 100644
--- a/Lib/test/test_zipimport.py
+++ b/Lib/test/test_zipimport.py
@@ -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()