Skip to content

Commit 482bcd6

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 d3dbd89 commit 482bcd6

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

791791
self.assertEqual(started, ['doc'])
792792

793+
@unittest.skipIf(expat.version_info < (2, 7, 1),
794+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
793795
def test_reparse_deferral_disabled(self):
794796
started = []
795797

Lib/test/test_sax.py

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

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

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

Lib/test/test_xml_etree.py

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

1524+
@unittest.skipIf(pyexpat.version_info < (2, 7, 1),
1525+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
15241526
def test_simple_xml_chunk_1(self):
15251527
self.test_simple_xml(chunk_size=1, flush=True)
15261528

1529+
@unittest.skipIf(pyexpat.version_info < (2, 7, 1),
1530+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
15271531
def test_simple_xml_chunk_5(self):
15281532
self.test_simple_xml(chunk_size=5, flush=True)
15291533

@@ -1748,6 +1752,8 @@ def test_flush_reparse_deferral_enabled(self):
17481752

17491753
self.assert_event_tags(parser, [('end', 'doc')])
17501754

1755+
@unittest.skipIf(pyexpat.version_info < (2, 7, 1),
1756+
f"Skip for expat < 2.7.1 (version available in RHEL 10)")
17511757
def test_flush_reparse_deferral_disabled(self):
17521758
parser = ET.XMLPullParser(events=('start', 'end'))
17531759

0 commit comments

Comments
 (0)