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

cross-import-overlays🍰 Cross-import overlays (Foundation, Core Graphics, etc.)enhancementNew feature or requestpublic-apiAffects public APItraitsIssues and PRs related to the trait subsystem or built-in traitstriagedThis issue has undergone initial triage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy