-
-
Notifications
You must be signed in to change notification settings - Fork 409
Closed
Description
Per #382 the default behavior with test fixtures is:
- to only regenerate them when the contents of the fixture script changes
- to not remove the fixtures after a test success
Potentially more desirable behavior is:
- automatically remove the generated fixture after a test completes
- a tunable (env var) to allow archiving the fixture before removal
- or always archive before removal
I'm thinking the default behavior should be to leverage TempDir with a check at the end to see if an environment variable is set. If the variable is set, archive the fixture directory before the TempDir object goes out of scope.
Alternatively the existing logic (hashing the contents of the fixture script and placing the output in a directory within the repo) could be retained.
With either implementation the question is whether it's more desirable to move towards putting the test logic into closures (for more automatic cleanup) or to add an explicit check at the end of each test.
Thoughts?
Metadata
Metadata
Assignees
Labels
No labels