Skip to content
Prev Previous commit
Next Next commit
Add a temporary workaround for issue 139400
  • Loading branch information
hartwork committed Oct 2, 2025
commit ce64f570fcc9a2a575d07108a08d76694abd5dde
18 changes: 18 additions & 0 deletions Lib/test/test_pyexpat.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,15 @@ def test_set_activation_threshold__fail_for_subparser(self):
setter = functools.partial(self.set_activation_threshold, subparser)
self.assert_root_parser_failure(setter, 12345)

# NOTE: This is a workaround for issue
# https://github.com/python/cpython/issues/139400
# that can be dropped once pull request
# https://github.com/python/cpython/pull/139403
# has been merged.
del setter
del subparser
del parser

@abc.abstractmethod
def test_set_maximum_amplification__amplification_exceeded(self):
"""Test when the amplification factor is exceeded."""
Expand Down Expand Up @@ -948,6 +957,15 @@ def test_set_maximum_amplification__fail_for_subparser(self):
setter = functools.partial(self.set_maximum_amplification, subparser)
self.assert_root_parser_failure(setter, 123.45)

# NOTE: This is a workaround for issue
# https://github.com/python/cpython/issues/139400
# that can be dropped once pull request
# https://github.com/python/cpython/pull/139403
# has been merged.
del setter
del subparser
del parser


@unittest.skipIf(expat.version_info < (2, 7, 2), "requires Expat >= 2.7.2")
class MemoryProtectionTest(AttackProtectionTestBase, unittest.TestCase):
Expand Down
Loading