-
-
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
tmpdir path too long on macOS #5802
Comments
Hmm, didn't realize I was using such an ancient version of pytest. It looks like 3.2.5 is the last version that supports Python 2.6. I assume this bug has been fixed in newer versions of pytest, so I'll close this unless I find a way to reproduce it. |
Hmm, but #291 was claimed to be fixed long before pytest 3.2.5. Reopening... |
indeed, thats a different issue (full path vs path component) as a workaround you can probably use |
Closing this for now, seems like using |
FWIW I have this in my testsuite for a similar issue: @pytest.fixture()
def short_tmpdir():
with tempfile.TemporaryDirectory() as tdir:
yield py.path.local(tdir) |
this solution will cleanup dir automatically after test, not good for development. |
could it at least be made easier to use this workaround and make basetmp something that is configurable in the pytest config file so that I don;t need to remember it passing it as an option every single time? |
You can configure any command line option in the config via |
Another solution is just set env var |
Thanks, that works. For some reason I was expecting:
but luckily
does exactly what I want |
@koffie please note that the basepmp option deletes the target folder |
@RonnyPfannschmidt thanks for the heads up. That is why I created a specific folder for pyrest tests and used |
@koffie current there isn't, but people miss the delete sometimes |
I have a unit test that runs
gpg
. First we setGNUPGHOME
to the temporary directory that pytest creates, then we run it using our own keys. However,gpg
fails with the following error:According to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847206,
gpg
cannot handle long paths. Is there any way to shorten/private/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/pytest-of-Adam/pytest-5/test_buildcache0/gpg/pubring.kbx
?platform darwin -- Python 3.7.3, pytest-3.2.5, py-1.4.34, pluggy-0.4.0
Possibly related to #291
The text was updated successfully, but these errors were encountered: