Skip to content

Document that tests should not have side-effects in the repo #1095

Description

@nathanjmcdougall

e.g. shouldn't modify any files, create new files, etc. in the repo itself; only in temporary directories (usually via the pytest tmp_path fixture).

Mention that if this happens, it's a sign that the CWD is not properly set using the usethis._test.change_cwd context manager

This should be mentioned in CONTRIBUTING.md and copilot-instructions.md

Activity

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

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions