Function makeCleanTempDir
Get a temporary directory for unit integration tests
string makeCleanTempDir
(
string postfix = __MODULE__
);
Tests that do IO usually write or read files from disk.
We want our tests to be reliable, reproducible, and re-runnable.
For this reason, this function returns a path which has been mkdir
ed
after having been cleaned, which is located in the temporary directory.
Consistent usage of this allows unit integration tests to be run in parallel
(however the same test cannot be run multiple times in parallel,
unless a different postfix is specified each time).
Parameters
Name | Description |
---|---|
postfix | A unique postfix for the calling test |
Returns
The path of a clean, empty directory