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

{envtmpdir} not created by default, unless already present #399

Closed
manueljacob opened this Issue Nov 4, 2016 · 3 comments

Comments

4 participants
@manueljacob
Contributor

manueljacob commented Nov 4, 2016

{envtmpdir} is not created by default. However if it's already present, it's deleted and recreated. This behavior is possibly confusing.

An example:

    • Currently, on the very first tox run, the envtmpdir is not existent.
    • In this example a command creates the envtmpdir; it succeeds.
    • On the second run, tox clears (i.e. deletes and recreates) the envtmpdir.
    • The command, like in the previous run, tries to create the envtmpdir, but it fails because it's already existent.

I see two solutions to provide a consistent environment on each test run.

  1. (Re-)create the envtmpdir before each tox run.
  2. Delete the envtmpdir before each tox run, without recreating it.

Solution 1 would be more convenient, as it saves the user from manually adding a command to every testenv to create the directory. However a configuration using the recreate option could rely on that the envtmpdir never exists when run.

@nicoddemus

This comment has been minimized.

Member

nicoddemus commented Nov 5, 2016

I agree solution 1 seems to be the correct one.

The documentation reads:

envtmpdir=path
defines a temporary directory for the virtualenv which will be cleared each time before the group of test commands is invoked. default: {envdir}/tmp

So I would expect it to be available (and empty) for the commands to use.

@obestwalter obestwalter added the bug label Nov 5, 2016

@hpk42

This comment has been minimized.

Contributor

hpk42 commented Nov 6, 2016

I agree -- we should create the tmpdir if it's not there. Fancy a PR? There's soon going to be the tox-2.5 release (maybe mid/end next week) btw :)

manueljacob added a commit to manueljacob/tox that referenced this issue Nov 7, 2016

manueljacob added a commit to manueljacob/tox that referenced this issue Nov 7, 2016

@hpk42

This comment has been minimized.

Contributor

hpk42 commented Nov 7, 2016

fixed by @manuljacob's PR. Thanks!

@hpk42 hpk42 closed this Nov 7, 2016

@obestwalter obestwalter added this to backlog in Squash all the bugs Mar 10, 2017

@obestwalter obestwalter moved this from backlog to released in Squash all the bugs Mar 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment