Skip to content

Commit 0ded7b8

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 efefe1e commit 0ded7b8

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
@@ -859,6 +859,8 @@ def start_element(name, _):
859859

860860
self.assertEqual(started, ['doc'])
861861

862+
@unittest.skipIf(expat.version_info < (2, 7, 1),
863+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
862864
def test_reparse_deferral_disabled(self):
863865
started = []
864866

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
@@ -1619,9 +1619,13 @@ def test_simple_xml(self, chunk_size=None, flush=False):
16191619
self.assert_event_tags(parser, [('end', 'root')])
16201620
self.assertIsNone(parser.close())
16211621

1622+
@unittest.skipIf(pyexpat.version_info < (2, 7, 1),
1623+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
16221624
def test_simple_xml_chunk_1(self):
16231625
self.test_simple_xml(chunk_size=1, flush=True)
16241626

1627+
@unittest.skipIf(pyexpat.version_info < (2, 7, 1),
1628+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
16251629
def test_simple_xml_chunk_5(self):
16261630
self.test_simple_xml(chunk_size=5, flush=True)
16271631

@@ -1848,6 +1852,8 @@ def test_flush_reparse_deferral_enabled(self):
18481852

18491853
self.assert_event_tags(parser, [('end', 'doc')])
18501854

1855+
@unittest.skipIf(pyexpat.version_info < (2, 7, 1),
1856+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
18511857
def test_flush_reparse_deferral_disabled(self):
18521858
parser = ET.XMLPullParser(events=('start', 'end'))
18531859

0 commit comments

Comments
 (0)