Skip to content

Commit

Permalink
sax|etree: Fix reparse deferral tests for vanilla Expat 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork committed Mar 24, 2024
1 parent 08c78ec commit 0491be1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Lib/test/test_sax.py
Original file line number Diff line number Diff line change
Expand Up @@ -1251,8 +1251,8 @@ def test_flush_reparse_deferral_disabled(self):

if pyexpat.version_info >= (2, 6, 0):
parser._parser.SetReparseDeferralEnabled(False)
self.assertEqual(result.getvalue(), start) # i.e. no elements started

self.assertEqual(result.getvalue(), start) # i.e. no elements started
self.assertFalse(parser._parser.GetReparseDeferralEnabled())

parser.flush()
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_xml_etree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1742,8 +1742,8 @@ def test_flush_reparse_deferral_disabled(self):
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

self.assert_event_tags(parser, []) # i.e. no elements started
if ET is pyET:
self.assertFalse(parser._parser._parser.GetReparseDeferralEnabled())

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix XML tests for vanilla Expat 2.5.0.

0 comments on commit 0491be1

Please sign in to comment.