Skip to content

Upgrade pytest in nix environment to at least version 7.3.0 #380

@spencerkclark

Description

@spencerkclark

The nix environment currently uses pytest version 6.2.3, which was released in April of 2021:

[nix-shell:~/fv3gfs-fortran]$ pytest --version
pytest 6.2.3

Versions 7.3.0 and above include a feature that allows temporary directories to be cleaned up immediately after successfully tests, rather than automatically preserved for three iterations of tests. Since the tests in this repository involve creating temporary directories that contain all the input data required to run the model, these directories rapidly fill up hard disk space, which is inconvenient since these directories are currently not automatically cleaned up.

See this issue for clarification of the current temporary directory behavior in pytest, and this issue and this PR for the new feature. Leveraging the feature would essentially involve adding a single line to our pytest.ini file:

tmp_path_retention_policy = "failed"

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