I need to be able to change the location of pytest's .cache directory to the env variable, WORKSPACE. Due to server permissions out of my control, I am running into this error because my user does not have permission to write in the directory where the tests are being run from:
py.error.EACCES: [Permission denied]: open('/path/to/restricted/directory/tests/.cache/v/cache/lastfailed', 'w')
Is there a way to set the path of the .cache directory to the environment variable WORKSPACE?
Cache files are stored in C:/Documents and Settings/<UserName>/Local Settings/Temporary Internet Files. You can also discover the person's cookies in a similar location, C:/Documents and Settings/<User Name>/Cookies.
Users can customize some pytest behavior using a configuration file called pytest. ini . This file is usually placed at the root of the repository and contains a number of configuration values that are applied to all test runs for that project.
You can prevent the creation of .cache/
by disabling the "cacheprovider" plugin:
py.test -p no:cacheprovider ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With