Skip to content

Commit ce64f57

Browse files
committed
Add a temporary workaround for issue 139400
1 parent 2ab3e1d commit ce64f57

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
@@ -914,6 +914,15 @@ def test_set_activation_threshold__fail_for_subparser(self):
914914
setter = functools.partial(self.set_activation_threshold, subparser)
915915
self.assert_root_parser_failure(setter, 12345)
916916

917+
# NOTE: This is a workaround for issue
918+
# https://github.com/python/cpython/issues/139400
919+
# that can be dropped once pull request
920+
# https://github.com/python/cpython/pull/139403
921+
# has been merged.
922+
del setter
923+
del subparser
924+
del parser
925+
917926
@abc.abstractmethod
918927
def test_set_maximum_amplification__amplification_exceeded(self):
919928
"""Test when the amplification factor is exceeded."""
@@ -948,6 +957,15 @@ def test_set_maximum_amplification__fail_for_subparser(self):
948957
setter = functools.partial(self.set_maximum_amplification, subparser)
949958
self.assert_root_parser_failure(setter, 123.45)
950959

960+
# NOTE: This is a workaround for issue
961+
# https://github.com/python/cpython/issues/139400
962+
# that can be dropped once pull request
963+
# https://github.com/python/cpython/pull/139403
964+
# has been merged.
965+
del setter
966+
del subparser
967+
del parser
968+
951969

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

0 commit comments

Comments
 (0)