Skip to content

test: drop hardcoded pytest --basetemp so parallel pixi run test in…#6008

Open
hunger wants to merge 1 commit intoprefix-dev:mainfrom
hunger:push-nuzytoqmkmuq
Open

test: drop hardcoded pytest --basetemp so parallel pixi run test in…#6008
hunger wants to merge 1 commit intoprefix-dev:mainfrom
hunger:push-nuzytoqmkmuq

Conversation

@hunger
Copy link
Copy Markdown
Contributor

@hunger hunger commented May 4, 2026

…vocations don't race

xdist.setup_node() calls basetemp.mkdir(mode=0o700) without exist_ok=True. With --basetemp=pytest-temp hardcoded in pytest.ini, the second of two concurrent pixi-test invocations panicked with
FileExistsError: '/var/home/tobias/src/pixi/pytest-temp'
Removing the override falls back to pytest's default /tmp/pytest-of-USER/pytest-N/, which auto-uniquifies per invocation.

How Has This Been Tested?

The unit tests

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

@hunger hunger requested a review from ruben-arts May 4, 2026 19:20
@baszalmstra
Copy link
Copy Markdown
Contributor

I think we did this to ensure the tempdir is on the same drive as the working directory. This enables reflinking which speeds up the tests. You can see that the test duration regressed quite a bit with this PR.

@hunger hunger force-pushed the push-nuzytoqmkmuq branch from 2a7fcbe to c924ae6 Compare May 4, 2026 21:43
@hunger
Copy link
Copy Markdown
Contributor Author

hunger commented May 4, 2026

@baszalmstra: Good catch!

The latest and greatest version appends the PID if the basetemp is unset, that seems to work just as well.

…vocations don't race

xdist.setup_node() calls basetemp.mkdir(mode=0o700) without exist_ok=True.
With `--basetemp=pytest-temp` hardcoded in pytest.ini, the second of two
concurrent pixi-test invocations panicked with
  FileExistsError: '/var/home/tobias/src/pixi/pytest-temp'
Removing the override falls back to pytest's default
/tmp/pytest-of-USER/pytest-N/, which auto-uniquifies per invocation.
@hunger hunger force-pushed the push-nuzytoqmkmuq branch from c924ae6 to 7bd2907 Compare May 5, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants