Return a unique directory name for this test function instance. Deletes and re-creates directory from previous test runs but lets the directory stay after the test run for eventual inspection. Returns the directory name, derived from the test file and function plus a sequence numbe
(request)
| 130 | |
| 131 | @pytest.fixture(scope="function") |
| 132 | def tempdir(request): |
| 133 | """Return a unique directory name for this test function instance. |
| 134 | |
| 135 | Deletes and re-creates directory from previous test runs but lets |
| 136 | the directory stay after the test run for eventual inspection. |
| 137 | |
| 138 | Returns the directory name, derived from the test file and |
| 139 | function plus a sequence number to work with parameterized tests. |
| 140 | |
| 141 | Does NOT change the current directory. |
| 142 | |
| 143 | MPI safe (assuming MPI.COMM_WORLD context). |
| 144 | |
| 145 | """ |
| 146 | return _create_tempdir(request) |
| 147 | |
| 148 | |
| 149 | @pytest.fixture(scope="function", autouse=True) |
nothing calls this directly
no test coverage detected