Skip to content

Commit 63a35ef

Browse files
Merge pull request #650 from casparvl/Document_all_readonly_files_testsuite
Add description of the new all_readonly_files attribute
2 parents ee36f64 + 68fa66b commit 63a35ef

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

docs/test-suite/writing-portable-tests.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,17 @@ test, so it can be safely symlinked:
356356
```
357357
readonly_files = ['mpi4py_reduce.py']
358358
```
359-
We’ve made the `readonly_files` attribute mandatory for all tests to ensure it’s
360-
not overlooked. If you are sure no files should be symlinked in your test, set
361-
it to `['']`:
359+
360+
If _all_ files in the source directory are read-only, instead of specifying the full list in `readonly_files`
361+
you can simply define
362+
363+
```
364+
all_readonly_files = True
365+
```
366+
and omit `readonly_files` from your class definition.
367+
368+
It's mandatory to define either the `readonly_files` or `all_readonly_files` attribute for all tests to ensure it’s
369+
not overlooked. If you are sure no files should be symlinked in your test, you can set:
362370
```
363371
readonly_files = ['']
364372
```

0 commit comments

Comments
 (0)