Skip to content

Comments

test: enforce tmp working directory#9149

Merged
Secrus merged 3 commits intopython-poetry:mainfrom
abn:enforce-working-directory
Mar 14, 2024
Merged

test: enforce tmp working directory#9149
Secrus merged 3 commits intopython-poetry:mainfrom
abn:enforce-working-directory

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
@Secrus Secrus merged commit 4f14967 into python-poetry:main Mar 14, 2024
@abn abn deleted the enforce-working-directory branch March 14, 2024 23:14
@github-actions
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