Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
python39.35266
old-libexpat.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File old-libexpat.patch of Package python39.35266
--- Lib/test/test_sax.py | 10 +++++----- Lib/test/test_xml_etree.py | 17 ++++++++--------- 2 files changed, 13 insertions(+), 14 deletions(-) --- a/Lib/test/test_sax.py +++ b/Lib/test/test_sax.py @@ -1211,10 +1211,9 @@ class ExpatReaderTest(XmlTestBase): self.assertEqual(result.getvalue(), start + b"<doc>text</doc>") + @unittest.skipIf(pyexpat.version_info < (2, 6, 0), + "Reparse deferral not defined for libexpat < 2.6.0") def test_flush_reparse_deferral_enabled(self): - if pyexpat.version_info < (2, 6, 0): - self.skipTest(f'Expat {pyexpat.version_info} does not support reparse deferral') - result = BytesIO() xmlgen = XMLGenerator(result) parser = create_parser() @@ -1236,6 +1235,8 @@ class ExpatReaderTest(XmlTestBase): self.assertEqual(result.getvalue(), start + b"<doc></doc>") + @unittest.skipIf(pyexpat.version_info < (2, 6, 0), + "Reparse deferral not defined for libexpat < 2.6.0") def test_flush_reparse_deferral_disabled(self): result = BytesIO() xmlgen = XMLGenerator(result) @@ -1245,8 +1246,7 @@ class ExpatReaderTest(XmlTestBase): for chunk in ("<doc", ">"): parser.feed(chunk) - if pyexpat.version_info >= (2, 6, 0): - parser._parser.SetReparseDeferralEnabled(False) + parser._parser.SetReparseDeferralEnabled(False) self.assertEqual(result.getvalue(), start) # i.e. no elements started self.assertFalse(parser._parser.GetReparseDeferralEnabled()) --- a/Lib/test/test_xml_etree.py +++ b/Lib/test/test_xml_etree.py @@ -1619,11 +1619,9 @@ class XMLPullParserTest(unittest.TestCas with self.assertRaises(ValueError): ET.XMLPullParser(events=('start', 'end', 'bogus')) + @unittest.skipIf(pyexpat.version_info < (2, 6, 0), + "Reparse deferral not defined for libexpat < 2.6.0") def test_flush_reparse_deferral_enabled(self): - if pyexpat.version_info < (2, 6, 0): - self.skipTest(f'Expat {pyexpat.version_info} does not ' - 'support reparse deferral') - parser = ET.XMLPullParser(events=('start', 'end')) for chunk in ("<doc", ">"): @@ -1644,17 +1642,18 @@ class XMLPullParserTest(unittest.TestCas self.assert_event_tags(parser, [('end', 'doc')]) + @unittest.skipIf(pyexpat.version_info < (2, 6, 0), + "Reparse deferral not defined for libexpat < 2.6.0") def test_flush_reparse_deferral_disabled(self): parser = ET.XMLPullParser(events=('start', 'end')) for chunk in ("<doc", ">"): parser.feed(chunk) - if pyexpat.version_info >= (2, 6, 0): - if not ET is pyET: - self.skipTest(f'XMLParser.(Get|Set)ReparseDeferralEnabled ' - 'methods not available in C') - parser._parser._parser.SetReparseDeferralEnabled(False) + if not ET is pyET: + self.skipTest(f'XMLParser.(Get|Set)ReparseDeferralEnabled ' + 'methods not available in C') + parser._parser._parser.SetReparseDeferralEnabled(False) self.assert_event_tags(parser, []) # i.e. no elements started if ET is pyET:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor