Comment 7 for bug 2024343

Revision history for this message
Miro HronĨok (churchyard) wrote :

I am working towards a backport for Fedora. Currently, the build fails with:

======================================================================
FAIL: test_schematron_invalid_schema_empty (lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_invalid_schema_empty)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.12/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib64/python3.12/unittest/case.py", line 634, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.12/unittest/case.py", line 589, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/builddir/build/BUILD/lxml-4.9.2/src/lxml/tests/test_isoschematron.py", line 62, in test_schematron_invalid_schema_empty
    self.assertRaises(etree.SchematronParseError,
  File "/usr/lib64/python3.12/unittest/case.py", line 778, in assertRaises
    return context.handle('assertRaises', args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/unittest/case.py", line 237, in handle
    with self:
  File "/usr/lib64/python3.12/unittest/case.py", line 260, in __exit__
    self._raiseFailure("{} not raised by {}".format(exc_name,
  File "/usr/lib64/python3.12/unittest/case.py", line 200, in _raiseFailure
    raise self.test_case.failureException(msg)
AssertionError: SchematronParseError not raised by Schematron

I suppose the test should be adapted as well, is that correct? I can submit a PR.