mirror of
https://github.com/python/cpython.git
synced 2026-04-14 07:41:00 +00:00
[3.14] GH-144739: Skip test_pyexpat.MemoryProtectionTest based on expat compile-time version, not runtime (#144740) (#145494)
GH-144739: Skip test_pyexpat.MemoryProtectionTest based on expat compile-time version, not runtime (#144740)
(cherry picked from commit 45e9343d7e)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
This commit is contained in:
parent
da3fea361e
commit
bcc2dd8d30
2 changed files with 6 additions and 1 deletions
|
|
@ -999,7 +999,9 @@ def test_set_maximum_amplification__fail_for_subparser(self):
|
|||
self.assert_root_parser_failure(setter, 123.45)
|
||||
|
||||
|
||||
@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
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Add a link
Reference in a new issue