Skip to content

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

@nathanjmcdougall

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

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