Open jayvdb opened 5 years ago
$ git grep concept.dtd tests
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ STDIN
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ tests/xml2/XMLBearTest.py:dtd_url = 'http://docs.oasis-open.org/dita/v1.0.1/dtd/concept.dtd'
2 │ tests/xml2/test_files/concept-invalid.xml:<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "http://docs.oasis-open.org/dita/v1.0.1/dtd/concept.dtd">
3 │ tests/xml2/test_files/concept-valid.xml:<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "http://docs.oasis-open.org/dita/v1.0.1/dtd/concept.dtd">
One approach is to use test data which is already included in distro packages, but that depends on whether the xml2 library can find local copies of external URL dtds.
Alternatively we need a mechanism for skipping tests which depend on online resources.
To reproduce, branch https://build.opensuse.org/package/show/home:jayvdb:coala/python-coala-bears , and edit the .spec to allow that test to run (I am deselecting it most of the time)
Error failed to load external entity "http://docs.oasis-open.org/dita/v1.0.1/dtd/concept.dtd" suggests that this is caused by the RPM build environment not having internet access.