Skip to content

test_TMSFactory b/c of morecantile 2.1.4 additional tilesetmatrix #358

Closed
@philvarner

Description

Problem description

test_TMSFactory test fails on master (same as tag 0.3.5)

__________________________________________________________________ test_TMSFactory __________________________________________________________________

    def test_TMSFactory():
        """test TMSFactory."""

        tms_endpoints = TMSFactory(router_prefix="tms")
        assert len(tms_endpoints.router.routes) == 2

        app = FastAPI()
        app.include_router(tms_endpoints.router, prefix="/tms")

        client = TestClient(app)

        response = client.get("/tms/tileMatrixSets")
        assert response.status_code == 200
        body = response.json()
>       assert len(body["tileMatrixSets"]) == 10  # morecantile has 10 defaults
E       AssertionError: assert 11 == 10
E        +  where 11 = len([{'id': 'CanadianNAD83_LCC', 'links': [{'href': 'http://testserver/tms/tileMatrixSets/CanadianNAD83_LCC', 'rel': 'item...MatrixSets/UPSAntarcticWGS84Quad', 'rel': 'item', 'type': 'application/json'}], 'title': 'UPSAntarcticWGS84Quad'}, ...])

src/titiler/core/tests/test_factories.py:674: AssertionError

This is likely because of

add NZTM2000Quad tile matrix set from LINZ (author @blacha, developmentseed/morecantile#57)

in

morecantile 2.1.4

Expected Output

all tests pass.

Environment Information

I saw this in GitHub Actions under 3.8 and 3.9, and locally on Mac with python 3.8.10.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions