-
Notifications
You must be signed in to change notification settings - Fork 379
fix: input globs normalisation and force reinstall #4931
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
base: main
Are you sure you want to change the base?
Changes from all commits
90f32ef
7deba02
2146da4
c1d4726
1e53040
9c2ee89
4c1e229
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2365,3 +2365,59 @@ def test_update_sync_conda_file( | |
| env=env, | ||
| cwd=cwd, | ||
| ) | ||
|
|
||
|
|
||
| @pytest.mark.slow | ||
| def test_install_source_package_with_force_reinstall( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you reduce the impact of this test on our CI time, this is taking 16s where only one test is slower than that. Some ideas would be a really basic python package
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only by moving this test to the pixi-integration-tests repo
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can make this test use the in-memory backend instead of actually installing something? |
||
| pixi: Path, tmp_path: Path, test_data: Path | ||
| ) -> None: | ||
| """Test that --force-reinstall actually rebuilds source packages.""" | ||
| env = {"PIXI_HOME": str(tmp_path)} | ||
|
|
||
| # Copy an existing source package from test data | ||
| source_package = test_data / "cpp_simple" | ||
| target_package = tmp_path / "test-source-package" | ||
| shutil.copytree(source_package, target_package) | ||
|
|
||
| # First installation | ||
| verify_cli_command( | ||
| [ | ||
| pixi, | ||
| "global", | ||
| "install", | ||
| "--path", | ||
| str(target_package), | ||
| ], | ||
| env=env, | ||
| stdout_contains="installed", | ||
| ) | ||
|
|
||
| # Second installation without force-reinstall | ||
| verify_cli_command( | ||
| [ | ||
| pixi, | ||
| "global", | ||
| "install", | ||
| "--path", | ||
| str(target_package), | ||
| ], | ||
| env=env, | ||
| stdout_contains="already installed", | ||
| ) | ||
|
|
||
| # Third installation with --force-reinstall | ||
| verify_cli_command( | ||
| [ | ||
| pixi, | ||
| "global", | ||
| "install", | ||
| "--path", | ||
| str(target_package), | ||
| "--force-reinstall", | ||
| ], | ||
| env=env, | ||
| # To verify that we really install again | ||
| stdout_contains="installed", | ||
| # and to verify that we really build from source | ||
| stderr_contains="Running build for recipe", | ||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to remove cached artefact