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
a846f5ac
Commit
a846f5ac
authored
Mar 18, 2013
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#17448: Make test_sax skip if there are no xml parsers.
Patch by Rafael Santos.
parent
dd246171
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
Lib/test/test_sax.py
Lib/test/test_sax.py
+2
-2
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_sax.py
View file @
a846f5ac
...
@@ -3,11 +3,12 @@
...
@@ -3,11 +3,12 @@
from
xml.sax
import
make_parser
,
ContentHandler
,
\
from
xml.sax
import
make_parser
,
ContentHandler
,
\
SAXException
,
SAXReaderNotAvailable
,
SAXParseException
SAXException
,
SAXReaderNotAvailable
,
SAXParseException
import
unittest
try
:
try
:
make_parser
()
make_parser
()
except
SAXReaderNotAvailable
:
except
SAXReaderNotAvailable
:
# don't try to test this module if we cannot create a parser
# don't try to test this module if we cannot create a parser
raise
ImportError
(
"no XML parsers available"
)
raise
unittest
.
SkipTest
(
"no XML parsers available"
)
from
xml.sax.saxutils
import
XMLGenerator
,
escape
,
unescape
,
quoteattr
,
\
from
xml.sax.saxutils
import
XMLGenerator
,
escape
,
unescape
,
quoteattr
,
\
XMLFilterBase
XMLFilterBase
from
xml.sax.expatreader
import
create_parser
from
xml.sax.expatreader
import
create_parser
...
@@ -18,7 +19,6 @@ import os.path
...
@@ -18,7 +19,6 @@ import os.path
import
shutil
import
shutil
from
test
import
support
from
test
import
support
from
test.support
import
findfile
,
run_unittest
from
test.support
import
findfile
,
run_unittest
import
unittest
TEST_XMLFILE
=
findfile
(
"test.xml"
,
subdir
=
"xmltestdata"
)
TEST_XMLFILE
=
findfile
(
"test.xml"
,
subdir
=
"xmltestdata"
)
TEST_XMLFILE_OUT
=
findfile
(
"test.xml.out"
,
subdir
=
"xmltestdata"
)
TEST_XMLFILE_OUT
=
findfile
(
"test.xml.out"
,
subdir
=
"xmltestdata"
)
...
...
Misc/ACKS
View file @
a846f5ac
...
@@ -947,6 +947,7 @@ Rich Salz
...
@@ -947,6 +947,7 @@ Rich Salz
Kevin Samborn
Kevin Samborn
Adrian Sampson
Adrian Sampson
Ilya Sandler
Ilya Sandler
Rafael Santos
Mark Sapiro
Mark Sapiro
Ty Sarna
Ty Sarna
Hugh Sasse
Hugh Sasse
...
...
Misc/NEWS
View file @
a846f5ac
...
@@ -967,6 +967,9 @@ Extension Modules
...
@@ -967,6 +967,9 @@ Extension Modules
Tests
Tests
-----
-----
- Issue #17448: test_sax now skips if there are no xml parsers available
instead of raising an ImportError.
- Issue #11420: make test suite pass with -B/DONTWRITEBYTECODE set.
- Issue #11420: make test suite pass with -B/DONTWRITEBYTECODE set.
Initial patch by Thomas Wouters.
Initial patch by Thomas Wouters.
...
...
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