Skip to content
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

Don't create tmpdir simlink if --basetemp is used #3715

Open
anxuae opened this issue Jul 25, 2018 · 2 comments
Open

Don't create tmpdir simlink if --basetemp is used #3715

anxuae opened this issue Jul 25, 2018 · 2 comments
Labels
plugin: tmpdir related to the tmpdir builtin plugin type: bug problem that needs to be addressed

Comments

@anxuae
Copy link

anxuae commented Jul 25, 2018

Using the option --basetemp has the consequence to create a link to each temporary directory, thus double the quantity of folders and let the temp directory less readable.

These link are generated by the method py.path.local.LocalPath.make_numbered_dir (see pytest-dev/py#194)

Configuration

  • Ubuntu 14.04
  • pytest version 3.6.0
@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #617 (Iterative tmpdir folders lost when using --basetemp), #444 (tmpdir: Use pathlib instead of py.path), #1120 (Cleaning up tmpdir's), #543 (Should tmpdir clean up after itself?), and #1784 (pytest_assertrepr_compare not being used?).

@0cjs
Copy link
Contributor

0cjs commented Jul 26, 2018

My experience has been that it creates only one link, removing it and recreating it for each use of the tmpdir fixture. But this may be related to the particular path you pass to --basetemp and where you have (or don't have) hyphens in it.

As I described in my comment on pytest-dev/py#194, my workaround was to ensure that the last component of the path I pass to --basetemp includes a hyphen, e.g., --basetemp=my-repo/.build/pytest/tmpdir-top, which will create just one my-repo/.build/pytest/tmpdir-current or similar link pointing to the tmpdir for the most recently run test.

@Zac-HD Zac-HD added type: bug problem that needs to be addressed plugin: tmpdir related to the tmpdir builtin plugin labels Oct 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: tmpdir related to the tmpdir builtin plugin type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

4 participants