[Pytest-commit] [hpk42/pytest] tmpdir names get too long on Windows (exceeding PATH_MAX) (issue #291)
Torsten Landschoff
issues-reply at bitbucket.org
Mon Apr 8 07:21:15 CEST 2013
New issue 291: tmpdir names get too long on Windows (exceeding PATH_MAX)
https://bitbucket.org/hpk42/pytest/issue/291/tmpdir-names-get-too-long-on-windows
Torsten Landschoff:
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:
c:\users\dynamore\appdata\local\temp\pytest-21\test_change_own_private_components_public_incoming_conflict_pull_C__jenkins_workspace_loco2_win7_32_client_release_testdata_testdb_dump_0\vaultdir\zipped\00\005292e500e4e76be18e798eccee423dec2e24c57db4b030348e67a7
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:
* the full function name
* the parameters of the test call (full path to testdb.dump over here)
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.
--
This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.
More information about the pytest-commit
mailing list