[Python-checkins] r42724 - in python/trunk: Lib/bsddb/test/test_1413192.py Lib/email/test/data/msg_44.txt Lib/encodings/utf_8_sig.py Lib/test/bad_coding2.py Lib/test/crashers/coerce.py Lib/test/crashers/dangerous_subclassing.py Lib/test/crashers/infinite_rec_1.py Lib/test/crashers/infinite_rec_2.py Lib/test/crashers/infinite_rec_3.py Lib/test/crashers/infinite_rec_4.py Lib/test/crashers/infinite_rec_5.py Lib/test/crashers/loosing_dict_ref.py Lib/test/crashers/modify_dict_attr.py Lib/test/crashers/recursive_call.py Lib/test/crashers/weakref_in_del.py Lib/test/crashers/xml_parsers.py Lib/test/outstanding_bugs.py Lib/test/test_defaultdict.py Lib/test/test_exception_variations.py Lib/test/test_platform.py Lib/xmlcore/etree/cElementTree.py Modules/zlib/algorithm.txt

tim.peters python-checkins at python.org
Wed Mar 1 07:19:10 CET 2006


Author: tim.peters
Date: Wed Mar  1 07:19:04 2006
New Revision: 42724

Modified:
   python/trunk/Lib/bsddb/test/test_1413192.py   (props changed)
   python/trunk/Lib/email/test/data/msg_44.txt   (props changed)
   python/trunk/Lib/encodings/utf_8_sig.py   (props changed)
   python/trunk/Lib/test/bad_coding2.py   (contents, props changed)
   python/trunk/Lib/test/crashers/coerce.py   (props changed)
   python/trunk/Lib/test/crashers/dangerous_subclassing.py   (props changed)
   python/trunk/Lib/test/crashers/infinite_rec_1.py   (props changed)
   python/trunk/Lib/test/crashers/infinite_rec_2.py   (props changed)
   python/trunk/Lib/test/crashers/infinite_rec_3.py   (props changed)
   python/trunk/Lib/test/crashers/infinite_rec_4.py   (props changed)
   python/trunk/Lib/test/crashers/infinite_rec_5.py   (props changed)
   python/trunk/Lib/test/crashers/loosing_dict_ref.py   (props changed)
   python/trunk/Lib/test/crashers/modify_dict_attr.py   (props changed)
   python/trunk/Lib/test/crashers/recursive_call.py   (props changed)
   python/trunk/Lib/test/crashers/weakref_in_del.py   (contents, props changed)
   python/trunk/Lib/test/crashers/xml_parsers.py   (contents, props changed)
   python/trunk/Lib/test/outstanding_bugs.py   (contents, props changed)
   python/trunk/Lib/test/test_defaultdict.py   (props changed)
   python/trunk/Lib/test/test_exception_variations.py   (contents, props changed)
   python/trunk/Lib/test/test_platform.py   (props changed)
   python/trunk/Lib/xmlcore/etree/cElementTree.py   (props changed)
   python/trunk/Modules/zlib/algorithm.txt   (props changed)
Log:
Set svn:eol-style to native.


Modified: python/trunk/Lib/test/bad_coding2.py
==============================================================================
--- python/trunk/Lib/test/bad_coding2.py	(original)
+++ python/trunk/Lib/test/bad_coding2.py	Wed Mar  1 07:19:04 2006
@@ -1,2 +1,2 @@
-#coding: utf8
-print '我'
+#coding: utf8
+print '我'

Modified: python/trunk/Lib/test/crashers/weakref_in_del.py
==============================================================================
--- python/trunk/Lib/test/crashers/weakref_in_del.py	(original)
+++ python/trunk/Lib/test/crashers/weakref_in_del.py	Wed Mar  1 07:19:04 2006
@@ -1,16 +1,16 @@
-import weakref
-
-# http://python.org/sf/1377858
-
-ref = None
-
-def test_weakref_in_del():
-    class Target(object):
-        def __del__(self):
-            global ref
-            ref = weakref.ref(self)
-
-    w = Target()
-
-if __name__ == '__main__':
-    test_weakref_in_del()
+import weakref
+
+# http://python.org/sf/1377858
+
+ref = None
+
+def test_weakref_in_del():
+    class Target(object):
+        def __del__(self):
+            global ref
+            ref = weakref.ref(self)
+
+    w = Target()
+
+if __name__ == '__main__':
+    test_weakref_in_del()

Modified: python/trunk/Lib/test/crashers/xml_parsers.py
==============================================================================
--- python/trunk/Lib/test/crashers/xml_parsers.py	(original)
+++ python/trunk/Lib/test/crashers/xml_parsers.py	Wed Mar  1 07:19:04 2006
@@ -1,56 +1,56 @@
-from xml.parsers import expat
-
-# http://python.org/sf/1296433
-
-def test_parse_only_xml_data():
-    #
-    xml = "<?xml version='1.0' encoding='iso8859'?><s>%s</s>" % ('a' * 1025)
-    # this one doesn't crash
-    #xml = "<?xml version='1.0'?><s>%s</s>" % ('a' * 10000)
-
-    def handler(text):
-        raise Exception
-
-    parser = expat.ParserCreate()
-    parser.CharacterDataHandler = handler
-
-    try:
-        parser.Parse(xml)
-    except:
-        pass
-
-if __name__ == '__main__':
-    test_parse_only_xml_data()
-
-# Invalid read of size 4
-#    at 0x43F936: PyObject_Free (obmalloc.c:735)
-#    by 0x45A7C7: unicode_dealloc (unicodeobject.c:246)
-#    by 0x1299021D: PyUnknownEncodingHandler (pyexpat.c:1314)
-#    by 0x12993A66: processXmlDecl (xmlparse.c:3330)
-#    by 0x12999211: doProlog (xmlparse.c:3678)
-#    by 0x1299C3F0: prologInitProcessor (xmlparse.c:3550)
-#    by 0x12991EA3: XML_ParseBuffer (xmlparse.c:1562)
-#    by 0x1298F8EC: xmlparse_Parse (pyexpat.c:895)
-#    by 0x47B3A1: PyEval_EvalFrameEx (ceval.c:3565)
-#    by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
-#    by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
-#    by 0x499820: PyRun_SimpleFileExFlags (pythonrun.c:1198)
-#    by 0x4117F1: Py_Main (main.c:492)
-#    by 0x12476D1F: __libc_start_main (in /lib/libc-2.3.5.so)
-#    by 0x410DC9: (within /home/neal/build/python/svn/clean/python)
-#  Address 0x12704020 is 264 bytes inside a block of size 592 free'd
-#    at 0x11B1BA8A: free (vg_replace_malloc.c:235)
-#    by 0x124B5F18: (within /lib/libc-2.3.5.so)
-#    by 0x48DE43: find_module (import.c:1320)
-#    by 0x48E997: import_submodule (import.c:2249)
-#    by 0x48EC15: load_next (import.c:2083)
-#    by 0x48F091: import_module_ex (import.c:1914)
-#    by 0x48F385: PyImport_ImportModuleEx (import.c:1955)
-#    by 0x46D070: builtin___import__ (bltinmodule.c:44)
-#    by 0x4186CF: PyObject_Call (abstract.c:1777)
-#    by 0x474E9B: PyEval_CallObjectWithKeywords (ceval.c:3432)
-#    by 0x47928E: PyEval_EvalFrameEx (ceval.c:2038)
-#    by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
-#    by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
-#    by 0x48D0F7: PyImport_ExecCodeModuleEx (import.c:635)
-#    by 0x48D4F4: load_source_module (import.c:913)
+from xml.parsers import expat
+
+# http://python.org/sf/1296433
+
+def test_parse_only_xml_data():
+    #
+    xml = "<?xml version='1.0' encoding='iso8859'?><s>%s</s>" % ('a' * 1025)
+    # this one doesn't crash
+    #xml = "<?xml version='1.0'?><s>%s</s>" % ('a' * 10000)
+
+    def handler(text):
+        raise Exception
+
+    parser = expat.ParserCreate()
+    parser.CharacterDataHandler = handler
+
+    try:
+        parser.Parse(xml)
+    except:
+        pass
+
+if __name__ == '__main__':
+    test_parse_only_xml_data()
+
+# Invalid read of size 4
+#    at 0x43F936: PyObject_Free (obmalloc.c:735)
+#    by 0x45A7C7: unicode_dealloc (unicodeobject.c:246)
+#    by 0x1299021D: PyUnknownEncodingHandler (pyexpat.c:1314)
+#    by 0x12993A66: processXmlDecl (xmlparse.c:3330)
+#    by 0x12999211: doProlog (xmlparse.c:3678)
+#    by 0x1299C3F0: prologInitProcessor (xmlparse.c:3550)
+#    by 0x12991EA3: XML_ParseBuffer (xmlparse.c:1562)
+#    by 0x1298F8EC: xmlparse_Parse (pyexpat.c:895)
+#    by 0x47B3A1: PyEval_EvalFrameEx (ceval.c:3565)
+#    by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
+#    by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
+#    by 0x499820: PyRun_SimpleFileExFlags (pythonrun.c:1198)
+#    by 0x4117F1: Py_Main (main.c:492)
+#    by 0x12476D1F: __libc_start_main (in /lib/libc-2.3.5.so)
+#    by 0x410DC9: (within /home/neal/build/python/svn/clean/python)
+#  Address 0x12704020 is 264 bytes inside a block of size 592 free'd
+#    at 0x11B1BA8A: free (vg_replace_malloc.c:235)
+#    by 0x124B5F18: (within /lib/libc-2.3.5.so)
+#    by 0x48DE43: find_module (import.c:1320)
+#    by 0x48E997: import_submodule (import.c:2249)
+#    by 0x48EC15: load_next (import.c:2083)
+#    by 0x48F091: import_module_ex (import.c:1914)
+#    by 0x48F385: PyImport_ImportModuleEx (import.c:1955)
+#    by 0x46D070: builtin___import__ (bltinmodule.c:44)
+#    by 0x4186CF: PyObject_Call (abstract.c:1777)
+#    by 0x474E9B: PyEval_CallObjectWithKeywords (ceval.c:3432)
+#    by 0x47928E: PyEval_EvalFrameEx (ceval.c:2038)
+#    by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
+#    by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
+#    by 0x48D0F7: PyImport_ExecCodeModuleEx (import.c:635)
+#    by 0x48D4F4: load_source_module (import.c:913)

Modified: python/trunk/Lib/test/outstanding_bugs.py
==============================================================================
--- python/trunk/Lib/test/outstanding_bugs.py	(original)
+++ python/trunk/Lib/test/outstanding_bugs.py	Wed Mar  1 07:19:04 2006
@@ -1,27 +1,27 @@
-#
-# This file is for everybody to add tests for bugs that aren't
-# fixed yet. Please add a test case and appropriate bug description.
-#
-# When you fix one of the bugs, please move the test to the correct
-# test_ module.
-#
-
-import unittest
-from test import test_support
-
-class TestBug1385040(unittest.TestCase):
-    def testSyntaxError(self):
-        import compiler
-
-        # The following snippet gives a SyntaxError in the interpreter
-        #
-        # If you compile and exec it, the call foo(7) returns (7, 1)
-        self.assertRaises(SyntaxError, compiler.compile,
-                          "def foo(a=1, b): return a, b\n\n", "<string>", "exec")
-
-
-def test_main():
-    test_support.run_unittest(TestBug1385040)
-
-if __name__ == "__main__":
-    test_main()
+#
+# This file is for everybody to add tests for bugs that aren't
+# fixed yet. Please add a test case and appropriate bug description.
+#
+# When you fix one of the bugs, please move the test to the correct
+# test_ module.
+#
+
+import unittest
+from test import test_support
+
+class TestBug1385040(unittest.TestCase):
+    def testSyntaxError(self):
+        import compiler
+
+        # The following snippet gives a SyntaxError in the interpreter
+        #
+        # If you compile and exec it, the call foo(7) returns (7, 1)
+        self.assertRaises(SyntaxError, compiler.compile,
+                          "def foo(a=1, b): return a, b\n\n", "<string>", "exec")
+
+
+def test_main():
+    test_support.run_unittest(TestBug1385040)
+
+if __name__ == "__main__":
+    test_main()

Modified: python/trunk/Lib/test/test_exception_variations.py
==============================================================================
--- python/trunk/Lib/test/test_exception_variations.py	(original)
+++ python/trunk/Lib/test/test_exception_variations.py	Wed Mar  1 07:19:04 2006
@@ -1,180 +1,180 @@
-
-from test.test_support import run_unittest
-import unittest
-
-class ExceptionTestCase(unittest.TestCase):
-    def test_try_except_else_finally(self):
-        hit_except = False
-        hit_else = False
-        hit_finally = False
-
-        try:
-            raise Exception, 'nyaa!'
-        except:
-            hit_except = True
-        else:
-            hit_else = True
-        finally:
-            hit_finally = True
-
-        self.assertTrue(hit_except)
-        self.assertTrue(hit_finally)
-        self.assertFalse(hit_else)
-
-    def test_try_except_else_finally_no_exception(self):
-        hit_except = False
-        hit_else = False
-        hit_finally = False
-
-        try:
-            pass
-        except:
-            hit_except = True
-        else:
-            hit_else = True
-        finally:
-            hit_finally = True
-
-        self.assertFalse(hit_except)
-        self.assertTrue(hit_finally)
-        self.assertTrue(hit_else)
-
-    def test_try_except_finally(self):
-        hit_except = False
-        hit_finally = False
-
-        try:
-            raise Exception, 'yarr!'
-        except:
-            hit_except = True
-        finally:
-            hit_finally = True
-
-        self.assertTrue(hit_except)
-        self.assertTrue(hit_finally)
-
-    def test_try_except_finally_no_exception(self):
-        hit_except = False
-        hit_finally = False
-
-        try:
-            pass
-        except:
-            hit_except = True
-        finally:
-            hit_finally = True
-
-        self.assertFalse(hit_except)
-        self.assertTrue(hit_finally)
-
-    def test_try_except(self):
-        hit_except = False
-
-        try:
-            raise Exception, 'ahoy!'
-        except:
-            hit_except = True
-
-        self.assertTrue(hit_except)
-
-    def test_try_except_no_exception(self):
-        hit_except = False
-
-        try:
-            pass
-        except:
-            hit_except = True
-
-        self.assertFalse(hit_except)
-
-    def test_try_except_else(self):
-        hit_except = False
-        hit_else = False
-
-        try:
-            raise Exception, 'foo!'
-        except:
-            hit_except = True
-        else:
-            hit_else = True
-
-        self.assertFalse(hit_else)
-        self.assertTrue(hit_except)
-
-    def test_try_except_else_no_exception(self):
-        hit_except = False
-        hit_else = False
-
-        try:
-            pass
-        except:
-            hit_except = True
-        else:
-            hit_else = True
-
-        self.assertFalse(hit_except)
-        self.assertTrue(hit_else)
-
-    def test_try_finally_no_exception(self):
-        hit_finally = False
-
-        try:
-            pass
-        finally:
-            hit_finally = True
-
-        self.assertTrue(hit_finally)
-
-    def test_nested(self):
-        hit_finally = False
-        hit_inner_except = False
-        hit_inner_finally = False
-
-        try:
-            try:
-                raise Exception, 'inner exception'
-            except:
-                hit_inner_except = True
-            finally:
-                hit_inner_finally = True
-        finally:
-            hit_finally = True
-
-        self.assertTrue(hit_inner_except)
-        self.assertTrue(hit_inner_finally)
-        self.assertTrue(hit_finally)
-
-    def test_nested_else(self):
-        hit_else = False
-        hit_finally = False
-        hit_except = False
-        hit_inner_except = False
-        hit_inner_else = False
-
-        try:
-            try:
-                pass
-            except:
-                hit_inner_except = True
-            else:
-                hit_inner_else = True
-
-            raise Exception, 'outer exception'
-        except:
-            hit_except = True
-        else:
-            hit_else = True
-        finally:
-            hit_finally = True
-
-        self.assertFalse(hit_inner_except)
-        self.assertTrue(hit_inner_else)
-        self.assertFalse(hit_else)
-        self.assertTrue(hit_finally)
-        self.assertTrue(hit_except)
-
-def test_main():
-    run_unittest(ExceptionTestCase)
-
-if __name__ == '__main__':
-    test_main()
+
+from test.test_support import run_unittest
+import unittest
+
+class ExceptionTestCase(unittest.TestCase):
+    def test_try_except_else_finally(self):
+        hit_except = False
+        hit_else = False
+        hit_finally = False
+
+        try:
+            raise Exception, 'nyaa!'
+        except:
+            hit_except = True
+        else:
+            hit_else = True
+        finally:
+            hit_finally = True
+
+        self.assertTrue(hit_except)
+        self.assertTrue(hit_finally)
+        self.assertFalse(hit_else)
+
+    def test_try_except_else_finally_no_exception(self):
+        hit_except = False
+        hit_else = False
+        hit_finally = False
+
+        try:
+            pass
+        except:
+            hit_except = True
+        else:
+            hit_else = True
+        finally:
+            hit_finally = True
+
+        self.assertFalse(hit_except)
+        self.assertTrue(hit_finally)
+        self.assertTrue(hit_else)
+
+    def test_try_except_finally(self):
+        hit_except = False
+        hit_finally = False
+
+        try:
+            raise Exception, 'yarr!'
+        except:
+            hit_except = True
+        finally:
+            hit_finally = True
+
+        self.assertTrue(hit_except)
+        self.assertTrue(hit_finally)
+
+    def test_try_except_finally_no_exception(self):
+        hit_except = False
+        hit_finally = False
+
+        try:
+            pass
+        except:
+            hit_except = True
+        finally:
+            hit_finally = True
+
+        self.assertFalse(hit_except)
+        self.assertTrue(hit_finally)
+
+    def test_try_except(self):
+        hit_except = False
+
+        try:
+            raise Exception, 'ahoy!'
+        except:
+            hit_except = True
+
+        self.assertTrue(hit_except)
+
+    def test_try_except_no_exception(self):
+        hit_except = False
+
+        try:
+            pass
+        except:
+            hit_except = True
+
+        self.assertFalse(hit_except)
+
+    def test_try_except_else(self):
+        hit_except = False
+        hit_else = False
+
+        try:
+            raise Exception, 'foo!'
+        except:
+            hit_except = True
+        else:
+            hit_else = True
+
+        self.assertFalse(hit_else)
+        self.assertTrue(hit_except)
+
+    def test_try_except_else_no_exception(self):
+        hit_except = False
+        hit_else = False
+
+        try:
+            pass
+        except:
+            hit_except = True
+        else:
+            hit_else = True
+
+        self.assertFalse(hit_except)
+        self.assertTrue(hit_else)
+
+    def test_try_finally_no_exception(self):
+        hit_finally = False
+
+        try:
+            pass
+        finally:
+            hit_finally = True
+
+        self.assertTrue(hit_finally)
+
+    def test_nested(self):
+        hit_finally = False
+        hit_inner_except = False
+        hit_inner_finally = False
+
+        try:
+            try:
+                raise Exception, 'inner exception'
+            except:
+                hit_inner_except = True
+            finally:
+                hit_inner_finally = True
+        finally:
+            hit_finally = True
+
+        self.assertTrue(hit_inner_except)
+        self.assertTrue(hit_inner_finally)
+        self.assertTrue(hit_finally)
+
+    def test_nested_else(self):
+        hit_else = False
+        hit_finally = False
+        hit_except = False
+        hit_inner_except = False
+        hit_inner_else = False
+
+        try:
+            try:
+                pass
+            except:
+                hit_inner_except = True
+            else:
+                hit_inner_else = True
+
+            raise Exception, 'outer exception'
+        except:
+            hit_except = True
+        else:
+            hit_else = True
+        finally:
+            hit_finally = True
+
+        self.assertFalse(hit_inner_except)
+        self.assertTrue(hit_inner_else)
+        self.assertFalse(hit_else)
+        self.assertTrue(hit_finally)
+        self.assertTrue(hit_except)
+
+def test_main():
+    run_unittest(ExceptionTestCase)
+
+if __name__ == '__main__':
+    test_main()


More information about the Python-checkins mailing list