You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'll encourage the use of readonly_files in tests (e.g. in reviews), because most tests actually don't write to the files in their sourcedir
We can implement an option to quickly mark all files in the sourcesdir as readonly. E.g. test developer would set readonly_files = 'all', then the EESSI_Mixin class, in it's class body, would list all files in the sourcesdir and overwrite readonly_files with that list.
We'll initialize readonly_files = None in the EESSI_Mixin class body. Then, check after init if it's been set to anything else. If not, we print an error from EESSI_Mixin telling users that they have to set it explicitely (e.g. to [] if they don't want any readonly files).
The text was updated successfully, but these errors were encountered:
unfortunately, it's not possible to set readonly_files = None in the EESSI_Mixin class body, because it is a built-in attribute.
as an alternative, we can tell users to set it to [''] if they really don't want any read-only files.
i wasn't able to implement readonly_files = 'all' or similar in the EESSI_Mixin class. It seems impossible to change the value of readonly_files there (or i may be doing it wrong).
the best i can up with is setting the following in the test class itself
readonly_files
in tests (e.g. in reviews), because most tests actually don't write to the files in their sourcedirreadonly_files = 'all'
, then theEESSI_Mixin
class, in it's class body, would list all files in thesourcesdir
and overwritereadonly_files
with that list.readonly_files = None
in theEESSI_Mixin
class body. Then, check after init if it's been set to anything else. If not, we print an error fromEESSI_Mixin
telling users that they have to set it explicitely (e.g. to[]
if they don't want any readonly files).The text was updated successfully, but these errors were encountered: