Skip to content

Test suite improvements #1684

@VeckoTheGecko

Description

@VeckoTheGecko

Currently (v3 of the codebase) the test suite takes 15+ minutes to run (windows is much more, closer to 30 mins). It would be good to reduce this, as well as bring other improvements to the test suite. I think code duplication, and "non-testing" (e.g., data setup) related code in the test suite is a pressing concern and makes it difficult to work with the test-suite.

We have 1112 tests, while xarray has 17354, yet xarray's test suite is 6 minutes. I think we can definitely improve here. From the top of my head (in order of what I think is most-> least pressing):

  • Defining a set of standard fieldsets (and other parcels related data objects) to do testing on by making them into fixtures in a conftest.py file so its scoped across the test suite
    • We have the test_data folder with datasets. I think these are only used for integration tests, with a lot of unit tests generating fieldset/grids within the tests themselves
  • Defining params appropriately to avoid unnecessary test duplication
  • Scoping fixtures appropriately (reducing set up/tear down of fixtures that are used a lot). I think this is less of an issue.

I think it would be worth investigating any additional measures xarray does to help with performance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Ready

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions