Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Lib/test/test_pyexpat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,9 @@ def test_set_maximum_amplification__amplification_not_exceeded(self):
self.assertIsNotNone(parser.Parse(payload, True))


@unittest.skipIf(expat.version_info < (2, 7, 2), "requires Expat >= 2.7.2")
@unittest.skipIf(not hasattr(expat.XMLParserType,
"SetAllocTrackerMaximumAmplification"),
"requires Python compiled with Expat >= 2.7.2")
class MemoryProtectionTest(AttackProtectionTestBase, unittest.TestCase):

# NOTE: with the default Expat configuration, the billion laughs protection
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
When Python was compiled with system expat older then 2.7.2 but tests run
with newer expat, still skip
:class:`!test.test_pyexpat.MemoryProtectionTest`.
Loading