Skip to content

Commit 98cb5cd

Browse files
committed
Add temporary workaround for issue 139400
1 parent a6a31cf commit 98cb5cd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Lib/test/test_pyexpat.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,15 @@ def test_set_activation_threshold__fail_for_subparser(self):
887887
setter = functools.partial(self.set_activation_threshold, subparser)
888888
self.assert_root_parser_failure(setter, 12345)
889889

890+
# NOTE: This is a workaround for issue
891+
# https://github.com/python/cpython/issues/139400
892+
# that can be dropped once pull request
893+
# https://github.com/python/cpython/pull/139403
894+
# has been merged.
895+
del setter
896+
del subparser
897+
del parser
898+
890899
@abc.abstractmethod
891900
def test_set_maximum_amplification__amplification_exceeded(self):
892901
"""Test when the amplification factor is exceeded."""
@@ -921,6 +930,15 @@ def test_set_maximum_amplification__fail_for_subparser(self):
921930
setter = functools.partial(self.set_maximum_amplification, subparser)
922931
self.assert_root_parser_failure(setter, 123.45)
923932

933+
# NOTE: This is a workaround for issue
934+
# https://github.com/python/cpython/issues/139400
935+
# that can be dropped once pull request
936+
# https://github.com/python/cpython/pull/139403
937+
# has been merged.
938+
del setter
939+
del subparser
940+
del parser
941+
924942

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

0 commit comments

Comments
 (0)