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
a7f4f5a7
Commit
a7f4f5a7
authored
Sep 04, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#2501 xml.sax.parser doesn't terminate when given a filename; enable some more tests!
Reviewed by myself
parent
ecaab837
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
Lib/test/test_sax.py
Lib/test/test_sax.py
+3
-6
Lib/xml/sax/xmlreader.py
Lib/xml/sax/xmlreader.py
+1
-1
No files found.
Lib/test/test_sax.py
View file @
a7f4f5a7
...
...
@@ -446,8 +446,7 @@ class ExpatReaderTest(XmlTestBase):
# ===== InputSource support
def
XXXtest_expat_inpsource_filename
(
self
):
# FIXME: test blocks indefinitely
def
test_expat_inpsource_filename
(
self
):
parser
=
create_parser
()
result
=
StringIO
()
xmlgen
=
XMLGenerator
(
result
)
...
...
@@ -457,8 +456,7 @@ class ExpatReaderTest(XmlTestBase):
self
.
assertEquals
(
result
.
getvalue
(),
xml_test_out
)
def
XXXtest_expat_inpsource_sysid
(
self
):
# FIXME: test blocks indefinitely
def
test_expat_inpsource_sysid
(
self
):
parser
=
create_parser
()
result
=
StringIO
()
xmlgen
=
XMLGenerator
(
result
)
...
...
@@ -531,8 +529,7 @@ class ExpatReaderTest(XmlTestBase):
self
.
assertEquals
(
parser
.
getPublicId
(),
None
)
self
.
assertEquals
(
parser
.
getLineNumber
(),
1
)
def
XXXtest_expat_locator_withinfo
(
self
):
# FIXME: test blocks indefinitely
def
test_expat_locator_withinfo
(
self
):
result
=
StringIO
()
xmlgen
=
XMLGenerator
(
result
)
parser
=
create_parser
()
...
...
Lib/xml/sax/xmlreader.py
View file @
a7f4f5a7
...
...
@@ -119,7 +119,7 @@ class IncrementalParser(XMLReader):
self
.
prepareParser
(
source
)
file
=
source
.
getByteStream
()
buffer
=
file
.
read
(
self
.
_bufsize
)
while
buffer
!=
""
:
while
buffer
:
self
.
feed
(
buffer
)
buffer
=
file
.
read
(
self
.
_bufsize
)
self
.
close
()
...
...
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