Skip to content

Add a built-in trait for creating a temporary directory scoped to a test #1113

@stmontgomery

Description

@stmontgomery

Description

The testing library should include a built-in trait which automatically creates a temporary directory (or just one file, as a variation of this) scoped to a test. The trait could clean up the file after the test finishes (as a configurable option, probably enabled by default), and perhaps even attach the temporary directory if the test failed for easier troubleshooting.

This could now be implemented using ST-0007: Test Scoping Traits. I think most of the remaining work would be deciding various other aspects of how it would behave, such as different options (if any) for specifying the temp dir's attributes, whether to dispose of it afterward, etc.

Additional information

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttraitsIssues and PRs related to the trait subsystem or built-in traits

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions