tmp_path symlink oddity #10910
Unanswered
nicoddemus
asked this question in
General
Replies: 1 comment 2 replies
-
It's a make numbered dir convenience going back to debugging pypy tests in pdb We can probably drop it over printing the paths these days |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks,
While investigating #10896, I noticed something which I find odd.
To reiterate how things work: when we use a
tmp_path
fixture for the first time, we create thebasetemp
directory usingmake_numbered_dir
, creating a new base temporary directory exclusive for that session:That
root dir
is created once for each user, andbasetemp
is created for each pytest session.In addition to that
pytest-905
directory, it will also create a symlink to it namedpytest-current
in the same directory (which I'm not sure what the use case is).So when a test with
tmp_path
executes, the fixture creates a new temporary directory for that test insidebasetemp
, again usingmake_numbered_dir
, which also includes that symlink:I kinda understand the reason for that first symlink to
basetemp
(pytest-current
), but can anyone explain the reason why we have a symlink for each directory created bytmp_path
(test1_7_current
, above)?Beta Was this translation helpful? Give feedback.
All reactions