Skip to content

Test suite fails when working offline #176

Description

@mgorny

When running the test suite on a firewalled environment without direct Internet connectivity, all tests fail with the same error, e.g.:

___________________________________________________________ test_glissando ____________________________________________________________

    def test_glissando():
>       compare_output('glissando')

tests/test_xml.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_xml.py:109: in compare_output
    validate_xml(output)
tests/test_xml.py:118: in validate_xml
    xmlschema = etree.XMLSchema(xmlschema_doc)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   lxml.etree.XMLSchemaParseError: attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does not resolve to a(n) attribute declaration., line 1810

src/lxml/xmlschema.pxi:90: XMLSchemaParseError

Activity

  1. mgorny commented on Jan 4, 2025

    @mgorny
    Author

    FWICS lxml has no caching either, so it refetches all the remote schema files every time. There's some discussion about the problem here: w3c-cg/musicxml#445. Apparently, the simplest solution would be to include the other files in the distribution, and replace the URL references with local paths.

  2. fedelibre commented on Apr 5, 2026

    @fedelibre
    Member

    This should have been fixed by #189 (0.9.10 release).

    Feel free to reopen the issue if I'm missing something.

  3. mgorny commented on Apr 5, 2026

    @mgorny
    Author

    Thanks, it seems good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions