Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_TMSFactory b/c of morecantile 2.1.4 additional tilesetmatrix #358

Closed
philvarner opened this issue Aug 20, 2021 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@philvarner
Copy link
Contributor

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.

@philvarner philvarner added the bug Something isn't working label Aug 20, 2021
@vincentsarago
Copy link
Member

fixed in 43223cb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants