Skip to content

Commit 786ef18

Browse files
author
tim.peters
committed
Set svn:eol-style to native.
git-svn-id: http://svn.python.org/projects/python/trunk@42724 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent b85fbd4 commit 786ef18

5 files changed

Lines changed: 281 additions & 281 deletions

File tree

Lib/test/bad_coding2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#coding: utf8
2-
print '我'
1+
#coding: utf8
2+
print '我'
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import weakref
2-
3-
# http://python.org/sf/1377858
4-
5-
ref = None
6-
7-
def test_weakref_in_del():
8-
class Target(object):
9-
def __del__(self):
10-
global ref
11-
ref = weakref.ref(self)
12-
13-
w = Target()
14-
15-
if __name__ == '__main__':
16-
test_weakref_in_del()
1+
import weakref
2+
3+
# http://python.org/sf/1377858
4+
5+
ref = None
6+
7+
def test_weakref_in_del():
8+
class Target(object):
9+
def __del__(self):
10+
global ref
11+
ref = weakref.ref(self)
12+
13+
w = Target()
14+
15+
if __name__ == '__main__':
16+
test_weakref_in_del()

Lib/test/crashers/xml_parsers.py

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
from xml.parsers import expat
2-
3-
# http://python.org/sf/1296433
4-
5-
def test_parse_only_xml_data():
6-
#
7-
xml = "<?xml version='1.0' encoding='iso8859'?><s>%s</s>" % ('a' * 1025)
8-
# this one doesn't crash
9-
#xml = "<?xml version='1.0'?><s>%s</s>" % ('a' * 10000)
10-
11-
def handler(text):
12-
raise Exception
13-
14-
parser = expat.ParserCreate()
15-
parser.CharacterDataHandler = handler
16-
17-
try:
18-
parser.Parse(xml)
19-
except:
20-
pass
21-
22-
if __name__ == '__main__':
23-
test_parse_only_xml_data()
24-
25-
# Invalid read of size 4
26-
# at 0x43F936: PyObject_Free (obmalloc.c:735)
27-
# by 0x45A7C7: unicode_dealloc (unicodeobject.c:246)
28-
# by 0x1299021D: PyUnknownEncodingHandler (pyexpat.c:1314)
29-
# by 0x12993A66: processXmlDecl (xmlparse.c:3330)
30-
# by 0x12999211: doProlog (xmlparse.c:3678)
31-
# by 0x1299C3F0: prologInitProcessor (xmlparse.c:3550)
32-
# by 0x12991EA3: XML_ParseBuffer (xmlparse.c:1562)
33-
# by 0x1298F8EC: xmlparse_Parse (pyexpat.c:895)
34-
# by 0x47B3A1: PyEval_EvalFrameEx (ceval.c:3565)
35-
# by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
36-
# by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
37-
# by 0x499820: PyRun_SimpleFileExFlags (pythonrun.c:1198)
38-
# by 0x4117F1: Py_Main (main.c:492)
39-
# by 0x12476D1F: __libc_start_main (in /lib/libc-2.3.5.so)
40-
# by 0x410DC9: (within /home/neal/build/python/svn/clean/python)
41-
# Address 0x12704020 is 264 bytes inside a block of size 592 free'd
42-
# at 0x11B1BA8A: free (vg_replace_malloc.c:235)
43-
# by 0x124B5F18: (within /lib/libc-2.3.5.so)
44-
# by 0x48DE43: find_module (import.c:1320)
45-
# by 0x48E997: import_submodule (import.c:2249)
46-
# by 0x48EC15: load_next (import.c:2083)
47-
# by 0x48F091: import_module_ex (import.c:1914)
48-
# by 0x48F385: PyImport_ImportModuleEx (import.c:1955)
49-
# by 0x46D070: builtin___import__ (bltinmodule.c:44)
50-
# by 0x4186CF: PyObject_Call (abstract.c:1777)
51-
# by 0x474E9B: PyEval_CallObjectWithKeywords (ceval.c:3432)
52-
# by 0x47928E: PyEval_EvalFrameEx (ceval.c:2038)
53-
# by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
54-
# by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
55-
# by 0x48D0F7: PyImport_ExecCodeModuleEx (import.c:635)
56-
# by 0x48D4F4: load_source_module (import.c:913)
1+
from xml.parsers import expat
2+
3+
# http://python.org/sf/1296433
4+
5+
def test_parse_only_xml_data():
6+
#
7+
xml = "<?xml version='1.0' encoding='iso8859'?><s>%s</s>" % ('a' * 1025)
8+
# this one doesn't crash
9+
#xml = "<?xml version='1.0'?><s>%s</s>" % ('a' * 10000)
10+
11+
def handler(text):
12+
raise Exception
13+
14+
parser = expat.ParserCreate()
15+
parser.CharacterDataHandler = handler
16+
17+
try:
18+
parser.Parse(xml)
19+
except:
20+
pass
21+
22+
if __name__ == '__main__':
23+
test_parse_only_xml_data()
24+
25+
# Invalid read of size 4
26+
# at 0x43F936: PyObject_Free (obmalloc.c:735)
27+
# by 0x45A7C7: unicode_dealloc (unicodeobject.c:246)
28+
# by 0x1299021D: PyUnknownEncodingHandler (pyexpat.c:1314)
29+
# by 0x12993A66: processXmlDecl (xmlparse.c:3330)
30+
# by 0x12999211: doProlog (xmlparse.c:3678)
31+
# by 0x1299C3F0: prologInitProcessor (xmlparse.c:3550)
32+
# by 0x12991EA3: XML_ParseBuffer (xmlparse.c:1562)
33+
# by 0x1298F8EC: xmlparse_Parse (pyexpat.c:895)
34+
# by 0x47B3A1: PyEval_EvalFrameEx (ceval.c:3565)
35+
# by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
36+
# by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
37+
# by 0x499820: PyRun_SimpleFileExFlags (pythonrun.c:1198)
38+
# by 0x4117F1: Py_Main (main.c:492)
39+
# by 0x12476D1F: __libc_start_main (in /lib/libc-2.3.5.so)
40+
# by 0x410DC9: (within /home/neal/build/python/svn/clean/python)
41+
# Address 0x12704020 is 264 bytes inside a block of size 592 free'd
42+
# at 0x11B1BA8A: free (vg_replace_malloc.c:235)
43+
# by 0x124B5F18: (within /lib/libc-2.3.5.so)
44+
# by 0x48DE43: find_module (import.c:1320)
45+
# by 0x48E997: import_submodule (import.c:2249)
46+
# by 0x48EC15: load_next (import.c:2083)
47+
# by 0x48F091: import_module_ex (import.c:1914)
48+
# by 0x48F385: PyImport_ImportModuleEx (import.c:1955)
49+
# by 0x46D070: builtin___import__ (bltinmodule.c:44)
50+
# by 0x4186CF: PyObject_Call (abstract.c:1777)
51+
# by 0x474E9B: PyEval_CallObjectWithKeywords (ceval.c:3432)
52+
# by 0x47928E: PyEval_EvalFrameEx (ceval.c:2038)
53+
# by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
54+
# by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
55+
# by 0x48D0F7: PyImport_ExecCodeModuleEx (import.c:635)
56+
# by 0x48D4F4: load_source_module (import.c:913)

Lib/test/outstanding_bugs.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
#
2-
# This file is for everybody to add tests for bugs that aren't
3-
# fixed yet. Please add a test case and appropriate bug description.
4-
#
5-
# When you fix one of the bugs, please move the test to the correct
6-
# test_ module.
7-
#
8-
9-
import unittest
10-
from test import test_support
11-
12-
class TestBug1385040(unittest.TestCase):
13-
def testSyntaxError(self):
14-
import compiler
15-
16-
# The following snippet gives a SyntaxError in the interpreter
17-
#
18-
# If you compile and exec it, the call foo(7) returns (7, 1)
19-
self.assertRaises(SyntaxError, compiler.compile,
20-
"def foo(a=1, b): return a, b\n\n", "<string>", "exec")
21-
22-
23-
def test_main():
24-
test_support.run_unittest(TestBug1385040)
25-
26-
if __name__ == "__main__":
27-
test_main()
1+
#
2+
# This file is for everybody to add tests for bugs that aren't
3+
# fixed yet. Please add a test case and appropriate bug description.
4+
#
5+
# When you fix one of the bugs, please move the test to the correct
6+
# test_ module.
7+
#
8+
9+
import unittest
10+
from test import test_support
11+
12+
class TestBug1385040(unittest.TestCase):
13+
def testSyntaxError(self):
14+
import compiler
15+
16+
# The following snippet gives a SyntaxError in the interpreter
17+
#
18+
# If you compile and exec it, the call foo(7) returns (7, 1)
19+
self.assertRaises(SyntaxError, compiler.compile,
20+
"def foo(a=1, b): return a, b\n\n", "<string>", "exec")
21+
22+
23+
def test_main():
24+
test_support.run_unittest(TestBug1385040)
25+
26+
if __name__ == "__main__":
27+
test_main()

0 commit comments

Comments
 (0)