Skip to content

Commit 7fe9933

Browse files
befelemehroncok
authored andcommitted
00466: Downstream only: Skip tests not working with older expat version
We want to run these tests in Fedora and EPEL 10, but not in EPEL 9, which has too old version of expat. We set the upper bound version in the conditionalized skip to a release available in CentOS Stream 10, which is tested as working.
1 parent db117b1 commit 7fe9933

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Lib/test/test_pyexpat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,8 @@ def start_element(name, _):
905905

906906
self.assertEqual(started, ['doc'])
907907

908+
@unittest.skipIf(expat.version_info < (2, 7, 1),
909+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
908910
def test_reparse_deferral_disabled(self):
909911
started = []
910912

Lib/test/test_sax.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,8 @@ def test_flush_reparse_deferral_enabled(self):
12411241

12421242
self.assertEqual(result.getvalue(), start + b"<doc></doc>")
12431243

1244+
@unittest.skipIf(pyexpat.version_info < (2, 7, 1),
1245+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
12441246
def test_flush_reparse_deferral_disabled(self):
12451247
result = BytesIO()
12461248
xmlgen = XMLGenerator(result)

Lib/test/test_xml_etree.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,9 +1573,13 @@ def test_simple_xml(self, chunk_size=None, flush=False):
15731573
self.assert_event_tags(parser, [('end', 'root')])
15741574
self.assertIsNone(parser.close())
15751575

1576+
@unittest.skipIf(pyexpat.version_info < (2, 7, 1),
1577+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
15761578
def test_simple_xml_chunk_1(self):
15771579
self.test_simple_xml(chunk_size=1, flush=True)
15781580

1581+
@unittest.skipIf(pyexpat.version_info < (2, 7, 1),
1582+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
15791583
def test_simple_xml_chunk_5(self):
15801584
self.test_simple_xml(chunk_size=5, flush=True)
15811585

@@ -1802,6 +1806,8 @@ def test_flush_reparse_deferral_enabled(self):
18021806

18031807
self.assert_event_tags(parser, [('end', 'doc')])
18041808

1809+
@unittest.skipIf(pyexpat.version_info < (2, 7, 1),
1810+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
18051811
def test_flush_reparse_deferral_disabled(self):
18061812
parser = ET.XMLPullParser(events=('start', 'end'))
18071813

0 commit comments

Comments
 (0)