-
-
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
Run pytest on read-only file systems #3557
Comments
In fact the last point seems to be covered already: pytest/src/_pytest/assertion/rewrite.py Lines 129 to 131 in 472354c
|
Makes sense to me. |
As far as I can tell, this is already satisfied. I set up this directory structure:
Then did
And this is the output of pytest:
The warning message is a bit weird ( |
Seems a tiny type error here: pytest/src/_pytest/terminal.py Line 685 in 80f8a3a
I'll take a stab at a fix, should be pretty easy (but again, orthogonal to this issue which seems "already fixed") |
#3563 addresses the warnings messaging |
Thanks @asottile! 👍 I created this mostly because it seems people still have issues with it. Let's try to direct new issues to this thread and reopen it as needed if we find something still lacking. Closing this then. |
I am on Windows.. running with
running the tests in
What I am finding is that if I startup Any idea why this might be happening? My first hypothesis was that this was because the cache is not being cleared... but I do have the |
|
@asottile, Thanks.. I see.. That actually makes senses that What additional arguments should I pass so as to not generate the @blueyed pointed out |
on windows setting |
For me this results in (BTW running in a Docker container):
So just have to use Edit: Or, not mentioned here, but mentioned on #200 and what I was looking-for (way of explicitly disabling |
* Add non-root user for running uwsgi in Dockerfile * Fix PermissionError due to COPY after chown * Bump flake8 from 3.8.3 to 3.8.4 Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.8.3 to 3.8.4. - [Release notes](https://gitlab.com/pycqa/flake8/tags) - [Commits](https://gitlab.com/pycqa/flake8/compare/3.8.3...3.8.4) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump pytest from 6.1.0 to 6.1.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.1.0 to 6.1.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](pytest-dev/pytest@6.1.0...6.1.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Remove log directory creation (#391) * Remove log directory creation * Remove unused import * Remove rate limiting for now * Fix volume permission overwrite This problem seems to be already known in docker/compose#3270 (comment) * Fix duplicate root mkdir * Disable pytest test caching See pytest-dev/pytest#3557 * Add blank coverage file * Added extra overriding of permissions command in CI config * Added user UID * Clean Dockerfile and revert pytest.ini Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Aaron Suarez <aaron.j.suarez1@gmail.com> Co-authored-by: Abdelrahman Kandil <abdelrahmankandil@hotmail.com> Co-authored-by: Aaron Suarez <aaron-suarez@users.noreply.github.com>
Follow up to: #200 (comment)
I propose:
PYTHONDONTWRITEBYTECODE
should not be necessary, we should just skip creating__pycache__
directories and writing rewritten.pyc
files in this case.The text was updated successfully, but these errors were encountered: