-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
tmpdir names get too long on Windows (exceeding PATH_MAX) #291
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
Comments
Original comment by Nenad Ognjanovic (BitBucket: bgr_, GitHub: bgr_): Hi, |
use new pluggy api (now at 0.3.0) for adding hookcall monitoring
This has been fixed for awhile now, tmpdir automatically truncates directory names to around def test_tmpdir_test_change_own_private_components_public_incoming_conflict_pull_C__jenkins_workspace_loco2_win7_32_client_release_testdata_testdb_dump(tmpdir):
print(tmpdir)
assert 0 Generates this path:
So I'm closing this. 😄 cc @Bluehorn |
Agreed, looks fixed to me :-) |
Originally reported by: Torsten Landschoff (BitBucket: bluehorn, GitHub: bluehorn)
Hi pytest Team,
we run into a lot of error in our release tests lately, which do not occur in nightly an on-commit tests. Looking into this, I discovered that path names get too long when we are using tmpdir:
On (german) Windows this results into
WindowsError: [Error 3] Das System kann den angegebenen Pfad nicht finden
which would point to a bug in our implementation.
It is unobvious to me that tmpdir includes the following info in the path:
This can make the temporary path arbitrary long which causes problems on Windows. I think, py.test should shorten the path automatically (at least on Windows). We can work around this by passing relative filenames (less robust in case the code does a chdir, but that would break other tests anyway) and by shorting the names of our test functions. However, I would like to keep the test function names expressive.
The text was updated successfully, but these errors were encountered: