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

test: enforce tmp working directory #9149

Merged
merged 3 commits into from
Mar 14, 2024

Conversation

abn
Copy link
Member

@abn abn commented Mar 13, 2024

This change ensures that working director when executing a test is set to tmp_path fixture value.

Additionally, we introduce the set_project_context fixture that allows for test cases to switch cwd to the required fixture project (copied to tmp_path by default) to ensure correct source files are used. Previously, some tests accidentally picked up incorrect pyproject.toml files as a result.

@abn abn force-pushed the enforce-working-directory branch 3 times, most recently from 8b5285d to 157b564 Compare March 14, 2024 21:06
@abn abn marked this pull request as ready for review March 14, 2024 21:12
@abn abn requested a review from a team March 14, 2024 21:12
abn added 3 commits March 14, 2024 22:14
This change ensures that working director when executing a test
is set to `tmp_path` fixture value.

Additionally, we introduce the `set_project_context` fixture that allows
for test cases to switch cwd to the required fixture project (copied to
`tmp_path` by default) to ensure correct source files are used.
Previously, some tests accidentally picked up incorrect pyproject.toml
files as a result.
@abn abn force-pushed the enforce-working-directory branch from 157b564 to fc1ca46 Compare March 14, 2024 21:14
tests/helpers.py Show resolved Hide resolved
@Secrus Secrus merged commit 4f14967 into python-poetry:main Mar 14, 2024
20 checks passed
@abn abn deleted the enforce-working-directory branch March 14, 2024 23:14
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants