Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a28ad778
Commit
a28ad778
authored
Jan 13, 2006
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace normalization.
parent
05f5ba96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
99 additions
and
100 deletions
+99
-100
Lib/test/crashers/weakref_in_del.py
Lib/test/crashers/weakref_in_del.py
+16
-17
Lib/test/crashers/xml_parsers.py
Lib/test/crashers/xml_parsers.py
+56
-56
Lib/test/outstanding_bugs.py
Lib/test/outstanding_bugs.py
+27
-27
No files found.
Lib/test/crashers/weakref_in_del.py
View file @
a28ad778
import
weakref
import
weakref
# http://python.org/sf/1377858
# http://python.org/sf/1377858
ref
=
None
ref
=
None
def
test_weakref_in_del
():
def
test_weakref_in_del
():
class
Target
(
object
):
class
Target
(
object
):
def
__del__
(
self
):
def
__del__
(
self
):
global
ref
global
ref
ref
=
weakref
.
ref
(
self
)
ref
=
weakref
.
ref
(
self
)
w
=
Target
()
w
=
Target
()
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
test_weakref_in_del
()
test_weakref_in_del
()
Lib/test/crashers/xml_parsers.py
View file @
a28ad778
from
xml.parsers
import
expat
from
xml.parsers
import
expat
# http://python.org/sf/1296433
# http://python.org/sf/1296433
def
test_parse_only_xml_data
():
def
test_parse_only_xml_data
():
#
#
xml
=
"<?xml version='1.0' encoding='iso8859'?><s>%s</s>"
%
(
'a'
*
1025
)
xml
=
"<?xml version='1.0' encoding='iso8859'?><s>%s</s>"
%
(
'a'
*
1025
)
# this one doesn't crash
# this one doesn't crash
#xml = "<?xml version='1.0'?><s>%s</s>" % ('a' * 10000)
#xml = "<?xml version='1.0'?><s>%s</s>" % ('a' * 10000)
def
handler
(
text
):
def
handler
(
text
):
raise
Exception
raise
Exception
parser
=
expat
.
ParserCreate
()
parser
=
expat
.
ParserCreate
()
parser
.
CharacterDataHandler
=
handler
parser
.
CharacterDataHandler
=
handler
try
:
try
:
parser
.
Parse
(
xml
)
parser
.
Parse
(
xml
)
except
:
except
:
pass
pass
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
test_parse_only_xml_data
()
test_parse_only_xml_data
()
# Invalid read of size 4
# Invalid read of size 4
# at 0x43F936: PyObject_Free (obmalloc.c:735)
# at 0x43F936: PyObject_Free (obmalloc.c:735)
# by 0x45A7C7: unicode_dealloc (unicodeobject.c:246)
# by 0x45A7C7: unicode_dealloc (unicodeobject.c:246)
# by 0x1299021D: PyUnknownEncodingHandler (pyexpat.c:1314)
# by 0x1299021D: PyUnknownEncodingHandler (pyexpat.c:1314)
# by 0x12993A66: processXmlDecl (xmlparse.c:3330)
# by 0x12993A66: processXmlDecl (xmlparse.c:3330)
# by 0x12999211: doProlog (xmlparse.c:3678)
# by 0x12999211: doProlog (xmlparse.c:3678)
# by 0x1299C3F0: prologInitProcessor (xmlparse.c:3550)
# by 0x1299C3F0: prologInitProcessor (xmlparse.c:3550)
# by 0x12991EA3: XML_ParseBuffer (xmlparse.c:1562)
# by 0x12991EA3: XML_ParseBuffer (xmlparse.c:1562)
# by 0x1298F8EC: xmlparse_Parse (pyexpat.c:895)
# by 0x1298F8EC: xmlparse_Parse (pyexpat.c:895)
# by 0x47B3A1: PyEval_EvalFrameEx (ceval.c:3565)
# by 0x47B3A1: PyEval_EvalFrameEx (ceval.c:3565)
# by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
# by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
# by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
# by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
# by 0x499820: PyRun_SimpleFileExFlags (pythonrun.c:1198)
# by 0x499820: PyRun_SimpleFileExFlags (pythonrun.c:1198)
# by 0x4117F1: Py_Main (main.c:492)
# by 0x4117F1: Py_Main (main.c:492)
# by 0x12476D1F: __libc_start_main (in /lib/libc-2.3.5.so)
# by 0x12476D1F: __libc_start_main (in /lib/libc-2.3.5.so)
# by 0x410DC9: (within /home/neal/build/python/svn/clean/python)
# by 0x410DC9: (within /home/neal/build/python/svn/clean/python)
# Address 0x12704020 is 264 bytes inside a block of size 592 free'd
# Address 0x12704020 is 264 bytes inside a block of size 592 free'd
# at 0x11B1BA8A: free (vg_replace_malloc.c:235)
# at 0x11B1BA8A: free (vg_replace_malloc.c:235)
# by 0x124B5F18: (within /lib/libc-2.3.5.so)
# by 0x124B5F18: (within /lib/libc-2.3.5.so)
# by 0x48DE43: find_module (import.c:1320)
# by 0x48DE43: find_module (import.c:1320)
# by 0x48E997: import_submodule (import.c:2249)
# by 0x48E997: import_submodule (import.c:2249)
# by 0x48EC15: load_next (import.c:2083)
# by 0x48EC15: load_next (import.c:2083)
# by 0x48F091: import_module_ex (import.c:1914)
# by 0x48F091: import_module_ex (import.c:1914)
# by 0x48F385: PyImport_ImportModuleEx (import.c:1955)
# by 0x48F385: PyImport_ImportModuleEx (import.c:1955)
# by 0x46D070: builtin___import__ (bltinmodule.c:44)
# by 0x46D070: builtin___import__ (bltinmodule.c:44)
# by 0x4186CF: PyObject_Call (abstract.c:1777)
# by 0x4186CF: PyObject_Call (abstract.c:1777)
# by 0x474E9B: PyEval_CallObjectWithKeywords (ceval.c:3432)
# by 0x474E9B: PyEval_CallObjectWithKeywords (ceval.c:3432)
# by 0x47928E: PyEval_EvalFrameEx (ceval.c:2038)
# by 0x47928E: PyEval_EvalFrameEx (ceval.c:2038)
# by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
# by 0x47CCAC: PyEval_EvalCodeEx (ceval.c:2739)
# by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
# by 0x47CDE1: PyEval_EvalCode (ceval.c:490)
# by 0x48D0F7: PyImport_ExecCodeModuleEx (import.c:635)
# by 0x48D0F7: PyImport_ExecCodeModuleEx (import.c:635)
# by 0x48D4F4: load_source_module (import.c:913)
# by 0x48D4F4: load_source_module (import.c:913)
Lib/test/outstanding_bugs.py
View file @
a28ad778
#
#
# This file is for everybody to add tests for bugs that aren't
# This file is for everybody to add tests for bugs that aren't
# fixed yet. Please add a test case and appropriate bug description.
# 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
# When you fix one of the bugs, please move the test to the correct
# test_ module.
# test_ module.
#
#
import
unittest
import
unittest
from
test
import
test_support
from
test
import
test_support
class
TestBug1385040
(
unittest
.
TestCase
):
class
TestBug1385040
(
unittest
.
TestCase
):
def
testSyntaxError
(
self
):
def
testSyntaxError
(
self
):
import
compiler
import
compiler
# The following snippet gives a SyntaxError in the interpreter
# The following snippet gives a SyntaxError in the interpreter
#
#
# If you compile and exec it, the call foo(7) returns (7, 1)
# If you compile and exec it, the call foo(7) returns (7, 1)
self
.
assertRaises
(
SyntaxError
,
compiler
.
compile
,
self
.
assertRaises
(
SyntaxError
,
compiler
.
compile
,
"def foo(a=1, b): return a, b
\
n
\
n
"
,
"<string>"
,
"exec"
)
"def foo(a=1, b): return a, b
\
n
\
n
"
,
"<string>"
,
"exec"
)
def
test_main
():
def
test_main
():
test_support
.
run_unittest
(
TestBug1385040
)
test_support
.
run_unittest
(
TestBug1385040
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
test_main
()
test_main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment