euroargodev / argopy

A python library for Argo data beginners and experts
https://argopy.readthedocs.io
European Union Public License 1.2
176 stars 39 forks source link

Can't run test_opt_invalid_cachedir under Windows #295

Open gmaze opened 11 months ago

gmaze commented 11 months ago

In CI tests, we have the test_options/test_opt_invalid_cachedir test that check if an OptionValueError is indeed raised when the option cache_dir is set to a folder without writing access. To run the test, we create a dummy folder, remove write access and try to set it as cache_dir.

The issue is that under the latest windows in Github Actions, I can't manage to create a non-writable folder ! I've tried to use icacls (see argopy/tests/helpers/utils.py) but it doesn't work, the command still return a:

b'processed file: read_only_folder\r
Successfully processed 1 files; Failed processing 0 files\r'

but os.stat(folder_name).st_mode remains 16895 instead of 16749.

I work with Mac and Linux not Windows, and can't easily try to fix this issue If you want to give it a try, you're welcome, I give up and skip this test for Windows platform

github-actions[bot] commented 8 months ago

This issue was marked as staled automatically because it has not seen any activity in 90 days