-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disable the creation of the __pycache__ directory #200
Comments
Where do we set PYTHONDONTWRITEBYTECODE=1.? |
Anywhere in your environment, |
Hello everyone, I have the same problem with creation of |
Hi @clorieanne, Not sure, pytest certainly respects that: pytest/src/_pytest/assertion/rewrite.py Lines 113 to 118 in 1815765
Also I just tested this and setting the Perhaps is some other library creating the folder? |
In order to prevent both The only thing that worked for me was using both the above solution as well as disabling caching
(source) As far as I can tell, the above command does not generate any artifacts. IMHO |
@golubitsky indeed FWIW cacheprovider is not about performance, but to persist data between test sessions, and provides |
Opened #3557 as followup. |
Hello, everyone |
@SharanyaVR You need to export the PYTHONDONTWRITEBYTECODE variable, not enough to only create it in the current shell. |
If you're used python venv built-in functionality for your virtual enviroment: If in your 'activate' script inside the enviroment folder around line 46 types: |
it will work better
|
@OCEANOFANYTHINGOFFICIAL this worked, thank you a lot. Quick, easy and simple 😄 |
…de-jam Pytest virtualenv code jam
Originally reported by: BitBucket: astrofrog, GitHub: astrofrog
Is there a way to disable the creation of the pycache directories, or cleanup these directories after testing, without installing any plugin or other packages?
The text was updated successfully, but these errors were encountered: