mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Remove exclude newer methods on test context (#4535)
## Summary Closes https://github.com/astral-sh/uv/issues/4531.
This commit is contained in:
parent
c28a2c7583
commit
41f051db3b
13 changed files with 493 additions and 510 deletions
|
@ -266,6 +266,7 @@ impl TestContext {
|
|||
.env("HOME", self.home_dir.as_os_str())
|
||||
.env("UV_TOOLCHAIN_DIR", "")
|
||||
.env("UV_TEST_PYTHON_PATH", &self.python_path())
|
||||
.env("UV_EXCLUDE_NEWER", EXCLUDE_NEWER)
|
||||
.current_dir(self.temp_dir.path());
|
||||
|
||||
if cfg!(all(windows, debug_assertions)) {
|
||||
|
@ -277,18 +278,6 @@ impl TestContext {
|
|||
|
||||
/// Create a `pip compile` command for testing.
|
||||
pub fn pip_compile(&self) -> Command {
|
||||
let mut command = self.pip_compile_without_exclude_newer();
|
||||
command.arg("--exclude-newer").arg(EXCLUDE_NEWER);
|
||||
command
|
||||
}
|
||||
|
||||
/// Create a `pip compile` command with no `--exclude-newer` option.
|
||||
///
|
||||
/// One should avoid using this in tests to the extent possible because
|
||||
/// it can result in tests failing when the index state changes. Therefore,
|
||||
/// if you use this, there should be some other kind of mitigation in place.
|
||||
/// For example, pinning package versions.
|
||||
pub fn pip_compile_without_exclude_newer(&self) -> Command {
|
||||
let mut command = Command::new(get_bin());
|
||||
command.arg("pip").arg("compile");
|
||||
self.add_shared_args(&mut command);
|
||||
|
@ -297,18 +286,6 @@ impl TestContext {
|
|||
|
||||
/// Create a `pip compile` command for testing.
|
||||
pub fn pip_sync(&self) -> Command {
|
||||
let mut command = self.pip_sync_without_exclude_newer();
|
||||
command.arg("--exclude-newer").arg(EXCLUDE_NEWER);
|
||||
command
|
||||
}
|
||||
|
||||
/// Create a `pip sync` command with no `--exclude-newer` option.
|
||||
///
|
||||
/// One should avoid using this in tests to the extent possible because
|
||||
/// it can result in tests failing when the index state changes. Therefore,
|
||||
/// if you use this, there should be some other kind of mitigation in place.
|
||||
/// For example, pinning package versions.
|
||||
pub fn pip_sync_without_exclude_newer(&self) -> Command {
|
||||
let mut command = Command::new(get_bin());
|
||||
command.arg("pip").arg("sync");
|
||||
self.add_shared_args(&mut command);
|
||||
|
@ -318,10 +295,7 @@ impl TestContext {
|
|||
/// Create a `uv venv` command
|
||||
pub fn venv(&self) -> Command {
|
||||
let mut command = Command::new(get_bin());
|
||||
command
|
||||
.arg("venv")
|
||||
.arg("--exclude-newer")
|
||||
.arg(EXCLUDE_NEWER);
|
||||
command.arg("venv");
|
||||
self.add_shared_args(&mut command);
|
||||
command.env_remove("VIRTUAL_ENV");
|
||||
command
|
||||
|
@ -329,18 +303,6 @@ impl TestContext {
|
|||
|
||||
/// Create a `pip install` command with options shared across scenarios.
|
||||
pub fn pip_install(&self) -> Command {
|
||||
let mut command = self.pip_install_without_exclude_newer();
|
||||
command.arg("--exclude-newer").arg(EXCLUDE_NEWER);
|
||||
command
|
||||
}
|
||||
|
||||
/// Create a `pip install` command with no `--exclude-newer` option.
|
||||
///
|
||||
/// One should avoid using this in tests to the extent possible because
|
||||
/// it can result in tests failing when the index state changes. Therefore,
|
||||
/// if you use this, there should be some other kind of mitigation in place.
|
||||
/// For example, pinning package versions.
|
||||
pub fn pip_install_without_exclude_newer(&self) -> Command {
|
||||
let mut command = Command::new(get_bin());
|
||||
command.arg("pip").arg("install");
|
||||
self.add_shared_args(&mut command);
|
||||
|
@ -365,18 +327,6 @@ impl TestContext {
|
|||
|
||||
/// Create a `uv lock` command with options shared across scenarios.
|
||||
pub fn lock(&self) -> Command {
|
||||
let mut command = self.lock_without_exclude_newer();
|
||||
command.arg("--exclude-newer").arg(EXCLUDE_NEWER);
|
||||
command
|
||||
}
|
||||
|
||||
/// Create a `uv lock` command with no `--exclude-newer` option.
|
||||
///
|
||||
/// One should avoid using this in tests to the extent possible because
|
||||
/// it can result in tests failing when the index state changes. Therefore,
|
||||
/// if you use this, there should be some other kind of mitigation in place.
|
||||
/// For example, pinning package versions.
|
||||
pub fn lock_without_exclude_newer(&self) -> Command {
|
||||
let mut command = Command::new(get_bin());
|
||||
command.arg("lock");
|
||||
self.add_shared_args(&mut command);
|
||||
|
@ -398,18 +348,6 @@ impl TestContext {
|
|||
|
||||
/// Create a `uv run` command with options shared across scenarios.
|
||||
pub fn run(&self) -> Command {
|
||||
let mut command = self.run_without_exclude_newer();
|
||||
command.arg("--exclude-newer").arg(EXCLUDE_NEWER);
|
||||
command
|
||||
}
|
||||
|
||||
/// Create a `uv run` command with no `--exclude-newer` option.
|
||||
///
|
||||
/// One should avoid using this in tests to the extent possible because
|
||||
/// it can result in tests failing when the index state changes. Therefore,
|
||||
/// if you use this, there should be some other kind of mitigation in place.
|
||||
/// For example, pinning package versions.
|
||||
pub fn run_without_exclude_newer(&self) -> Command {
|
||||
let mut command = Command::new(get_bin());
|
||||
command.arg("run");
|
||||
self.add_shared_args(&mut command);
|
||||
|
@ -418,18 +356,6 @@ impl TestContext {
|
|||
|
||||
/// Create a `uv tool run` command with options shared across scenarios.
|
||||
pub fn tool_run(&self) -> Command {
|
||||
let mut command = self.tool_run_without_exclude_newer();
|
||||
command.arg("--exclude-newer").arg(EXCLUDE_NEWER);
|
||||
command
|
||||
}
|
||||
|
||||
/// Create a `uv tool run` command with no `--exclude-newer` option.
|
||||
///
|
||||
/// One should avoid using this in tests to the extent possible because
|
||||
/// it can result in tests failing when the index state changes. Therefore,
|
||||
/// if you use this, there should be some other kind of mitigation in place.
|
||||
/// For example, pinning package versions.
|
||||
pub fn tool_run_without_exclude_newer(&self) -> Command {
|
||||
let mut command = Command::new(get_bin());
|
||||
command.arg("tool").arg("run");
|
||||
self.add_shared_args(&mut command);
|
||||
|
|
|
@ -35,7 +35,7 @@ fn add_registry() -> Result<()> {
|
|||
Prepared 4 packages in [TIME]
|
||||
Installed 4 packages in [TIME]
|
||||
+ anyio==3.7.0
|
||||
+ idna==3.7
|
||||
+ idna==3.6
|
||||
+ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
@ -78,7 +78,7 @@ fn add_registry() -> Result<()> {
|
|||
|
||||
[[distribution.dependencies]]
|
||||
name = "idna"
|
||||
version = "3.7"
|
||||
version = "3.6"
|
||||
source = "registry+https://pypi.org/simple"
|
||||
|
||||
[[distribution.dependencies]]
|
||||
|
@ -88,10 +88,10 @@ fn add_registry() -> Result<()> {
|
|||
|
||||
[[distribution]]
|
||||
name = "idna"
|
||||
version = "3.7"
|
||||
version = "3.6"
|
||||
source = "registry+https://pypi.org/simple"
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/21/ed/f86a79a07470cb07819390452f178b3bef1d375f2ec021ecfc709fc7cf07/idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc", size = 189575 }
|
||||
wheels = [{ url = "https://files.pythonhosted.org/packages/e5/3e/741d8c82801c347547f8a2a06aa57dbb1992be9e948df2ea0eda2c8b79e8/idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0", size = 66836 }]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/bf/3f/ea4b9117521a1e9c50344b909be7886dd00a519552724809bb1f486986c2/idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca", size = 175426 }
|
||||
wheels = [{ url = "https://files.pythonhosted.org/packages/c2/e7/a82b05cf63a603df6e68d59ae6a68bf5064484a0718ea5033660af4b54a9/idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f", size = 61567 }]
|
||||
|
||||
[[distribution]]
|
||||
name = "project"
|
||||
|
@ -567,7 +567,7 @@ fn add_remove_dev() -> Result<()> {
|
|||
Prepared 4 packages in [TIME]
|
||||
Installed 4 packages in [TIME]
|
||||
+ anyio==3.7.0
|
||||
+ idna==3.7
|
||||
+ idna==3.6
|
||||
+ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
+ sniffio==1.3.1
|
||||
"###);
|
||||
|
@ -613,7 +613,7 @@ fn add_remove_dev() -> Result<()> {
|
|||
|
||||
[[distribution.dependencies]]
|
||||
name = "idna"
|
||||
version = "3.7"
|
||||
version = "3.6"
|
||||
source = "registry+https://pypi.org/simple"
|
||||
|
||||
[[distribution.dependencies]]
|
||||
|
@ -623,10 +623,10 @@ fn add_remove_dev() -> Result<()> {
|
|||
|
||||
[[distribution]]
|
||||
name = "idna"
|
||||
version = "3.7"
|
||||
version = "3.6"
|
||||
source = "registry+https://pypi.org/simple"
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/21/ed/f86a79a07470cb07819390452f178b3bef1d375f2ec021ecfc709fc7cf07/idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc", size = 189575 }
|
||||
wheels = [{ url = "https://files.pythonhosted.org/packages/e5/3e/741d8c82801c347547f8a2a06aa57dbb1992be9e948df2ea0eda2c8b79e8/idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0", size = 66836 }]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/bf/3f/ea4b9117521a1e9c50344b909be7886dd00a519552724809bb1f486986c2/idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca", size = 175426 }
|
||||
wheels = [{ url = "https://files.pythonhosted.org/packages/c2/e7/a82b05cf63a603df6e68d59ae6a68bf5064484a0718ea5033660af4b54a9/idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f", size = 61567 }]
|
||||
|
||||
[[distribution]]
|
||||
name = "project"
|
||||
|
@ -687,7 +687,7 @@ fn add_remove_dev() -> Result<()> {
|
|||
Uninstalled 4 packages in [TIME]
|
||||
Installed 1 package in [TIME]
|
||||
- anyio==3.7.0
|
||||
- idna==3.7
|
||||
- idna==3.6
|
||||
- project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
+ project==0.1.0 (from file://[TEMP_DIR]/)
|
||||
- sniffio==1.3.1
|
||||
|
|
|
@ -125,7 +125,7 @@ fn lock_sdist_registry() -> Result<()> {
|
|||
"#,
|
||||
)?;
|
||||
|
||||
uv_snapshot!(context.filters(), context.lock_without_exclude_newer(), @r###"
|
||||
uv_snapshot!(context.filters(), context.lock().env_remove("UV_EXCLUDE_NEWER"), @r###"
|
||||
success: true
|
||||
exit_code: 0
|
||||
----- stdout -----
|
||||
|
@ -166,7 +166,7 @@ fn lock_sdist_registry() -> Result<()> {
|
|||
});
|
||||
|
||||
// Install from the lockfile.
|
||||
uv_snapshot!(context.filters(), context.sync(), @r###"
|
||||
uv_snapshot!(context.filters(), context.sync().env_remove("UV_EXCLUDE_NEWER"), @r###"
|
||||
success: true
|
||||
exit_code: 0
|
||||
----- stdout -----
|
||||
|
|
|
@ -60,7 +60,8 @@ fn fork_allows_non_conflicting_non_overlapping_dependencies() -> Result<()> {
|
|||
"###
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -170,7 +171,8 @@ fn fork_allows_non_conflicting_repeated_dependencies() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -255,7 +257,8 @@ fn fork_basic() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -359,7 +362,8 @@ fn fork_conflict_unsatisfiable() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -440,7 +444,8 @@ fn fork_filter_sibling_dependencies() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -599,7 +604,8 @@ fn fork_marker_accrue() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -724,7 +730,8 @@ fn fork_marker_disjoint() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -795,7 +802,8 @@ fn fork_marker_inherit_combined_allowed() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -948,7 +956,8 @@ fn fork_marker_inherit_combined_disallowed() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -1089,7 +1098,8 @@ fn fork_marker_inherit_combined() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -1224,7 +1234,8 @@ fn fork_marker_inherit_isolated() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -1351,7 +1362,8 @@ fn fork_marker_inherit_transitive() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -1484,7 +1496,8 @@ fn fork_marker_inherit() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -1598,7 +1611,8 @@ fn fork_marker_limited_inherit() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -1734,7 +1748,8 @@ fn fork_marker_selection() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -1885,7 +1900,8 @@ fn fork_marker_track() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -2035,7 +2051,8 @@ fn fork_non_fork_marker_transitive() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -2161,7 +2178,8 @@ fn fork_non_local_fork_marker_direct() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -2235,7 +2253,8 @@ fn fork_non_local_fork_marker_transitive() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -2295,7 +2314,8 @@ fn fork_requires_python_full_prerelease() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -2367,7 +2387,8 @@ fn fork_requires_python_full() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -2442,7 +2463,8 @@ fn fork_requires_python_patch_overlap() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
@ -2525,7 +2547,8 @@ fn fork_requires_python() -> Result<()> {
|
|||
"###,
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url")
|
||||
.arg("https://astral-sh.github.io/packse/0.3.29/simple-html/");
|
||||
uv_snapshot!(filters, cmd, @r###"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -31,6 +31,7 @@ fn command(context: &TestContext, python_versions: &[&str]) -> Command {
|
|||
.arg("--find-links")
|
||||
.arg("https://raw.githubusercontent.com/astral-sh/packse/0.3.29/vendor/links.html");
|
||||
context.add_shared_args(&mut command);
|
||||
command.env_remove("UV_EXCLUDE_NEWER");
|
||||
command.env("UV_TEST_PYTHON_PATH", python_path);
|
||||
|
||||
command
|
||||
|
|
|
@ -1314,7 +1314,8 @@ fn install_no_index_version() {
|
|||
fn install_extra_index_url_has_priority() {
|
||||
let context = TestContext::new("3.12");
|
||||
|
||||
uv_snapshot!(context.pip_install_without_exclude_newer()
|
||||
uv_snapshot!(context.pip_install()
|
||||
.env_remove("UV_EXCLUDE_NEWER")
|
||||
.arg("--index-url")
|
||||
.arg("https://test.pypi.org/simple")
|
||||
.arg("--extra-index-url")
|
||||
|
@ -3508,7 +3509,8 @@ fn install_utf16le_requirements() -> Result<()> {
|
|||
let requirements_txt = context.temp_dir.child("requirements.txt");
|
||||
requirements_txt.write_binary(&utf8_to_utf16_with_bom_le("tomli"))?;
|
||||
|
||||
uv_snapshot!(context.pip_install_without_exclude_newer()
|
||||
uv_snapshot!(context.pip_install()
|
||||
.env_remove("UV_EXCLUDE_NEWER")
|
||||
.arg("-r")
|
||||
.arg("requirements.txt"), @r###"
|
||||
success: true
|
||||
|
@ -3534,7 +3536,8 @@ fn install_utf16be_requirements() -> Result<()> {
|
|||
let requirements_txt = context.temp_dir.child("requirements.txt");
|
||||
requirements_txt.write_binary(&utf8_to_utf16_with_bom_be("tomli"))?;
|
||||
|
||||
uv_snapshot!(context.pip_install_without_exclude_newer()
|
||||
uv_snapshot!(context.pip_install()
|
||||
.env_remove("UV_EXCLUDE_NEWER")
|
||||
.arg("-r")
|
||||
.arg("requirements.txt"), @r###"
|
||||
success: true
|
||||
|
@ -5633,7 +5636,8 @@ fn local_index_absolute() -> Result<()> {
|
|||
</html>
|
||||
"#, Url::from_directory_path(context.workspace_root.join("scripts/links/")).unwrap().as_str()})?;
|
||||
|
||||
uv_snapshot!(context.filters(), context.pip_install_without_exclude_newer()
|
||||
uv_snapshot!(context.filters(), context.pip_install()
|
||||
.env_remove("UV_EXCLUDE_NEWER")
|
||||
.arg("tqdm")
|
||||
.arg("--index-url")
|
||||
.arg(Url::from_directory_path(root).unwrap().as_str()), @r###"
|
||||
|
@ -5683,7 +5687,8 @@ fn local_index_relative() -> Result<()> {
|
|||
</html>
|
||||
"#, Url::from_directory_path(context.workspace_root.join("scripts/links/")).unwrap().as_str()})?;
|
||||
|
||||
uv_snapshot!(context.filters(), context.pip_install_without_exclude_newer()
|
||||
uv_snapshot!(context.filters(), context.pip_install()
|
||||
.env_remove("UV_EXCLUDE_NEWER")
|
||||
.arg("tqdm")
|
||||
.arg("--index-url")
|
||||
.arg("./simple-html"), @r###"
|
||||
|
@ -5739,7 +5744,8 @@ fn local_index_requirements_txt_absolute() -> Result<()> {
|
|||
tqdm
|
||||
"#, Url::from_directory_path(root).unwrap().as_str()})?;
|
||||
|
||||
uv_snapshot!(context.filters(), context.pip_install_without_exclude_newer()
|
||||
uv_snapshot!(context.filters(), context.pip_install()
|
||||
.env_remove("UV_EXCLUDE_NEWER")
|
||||
.arg("-r")
|
||||
.arg("requirements.txt"), @r###"
|
||||
success: true
|
||||
|
@ -5796,7 +5802,8 @@ fn local_index_requirements_txt_relative() -> Result<()> {
|
|||
",
|
||||
)?;
|
||||
|
||||
uv_snapshot!(context.filters(), context.pip_install_without_exclude_newer()
|
||||
uv_snapshot!(context.filters(), context.pip_install()
|
||||
.env_remove("UV_EXCLUDE_NEWER")
|
||||
.arg("-r")
|
||||
.arg("requirements.txt"), @r###"
|
||||
success: true
|
||||
|
|
|
@ -50,6 +50,7 @@ fn command(context: &TestContext) -> Command {
|
|||
.arg("--find-links")
|
||||
.arg("https://raw.githubusercontent.com/astral-sh/packse/0.3.29/vendor/links.html");
|
||||
context.add_shared_args(&mut command);
|
||||
command.env_remove("UV_EXCLUDE_NEWER");
|
||||
command
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -239,7 +239,8 @@ fn cyclic_dependency() {
|
|||
.write_str("uv-cyclic-dependencies-c")
|
||||
.unwrap();
|
||||
|
||||
let mut command = context.pip_install_without_exclude_newer();
|
||||
let mut command = context.pip_install();
|
||||
command.env_remove("UV_EXCLUDE_NEWER");
|
||||
command
|
||||
.arg("-r")
|
||||
.arg("requirements.txt")
|
||||
|
@ -501,7 +502,8 @@ fn no_dedupe_and_cycle() {
|
|||
"###
|
||||
);
|
||||
|
||||
let mut command = context.pip_install_without_exclude_newer();
|
||||
let mut command = context.pip_install();
|
||||
command.env_remove("UV_EXCLUDE_NEWER");
|
||||
command
|
||||
.arg("uv-cyclic-dependencies-c==0.1.0")
|
||||
.arg("--index-url")
|
||||
|
|
|
@ -31,6 +31,7 @@ fn command(context: &TestContext, python_versions: &[&str]) -> Command {
|
|||
.arg("--find-links")
|
||||
.arg("{{vendor_links}}");
|
||||
context.add_shared_args(&mut command);
|
||||
command.env_remove("UV_EXCLUDE_NEWER");
|
||||
command.env("UV_TEST_PYTHON_PATH", python_path);
|
||||
|
||||
command
|
||||
|
|
|
@ -51,6 +51,7 @@ fn command(context: &TestContext) -> Command {
|
|||
.arg("--find-links")
|
||||
.arg("{{vendor_links}}");
|
||||
context.add_shared_args(&mut command);
|
||||
command.env_remove("UV_EXCLUDE_NEWER");
|
||||
command
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,8 @@ fn {{module_name}}() -> Result<()> {
|
|||
"###
|
||||
)?;
|
||||
|
||||
let mut cmd = context.lock_without_exclude_newer();
|
||||
let mut cmd = context.lock();
|
||||
cmd.env_remove("UV_EXCLUDE_NEWER");
|
||||
cmd.arg("--index-url").arg("{{index_url}}");
|
||||
{{#expected.explanation_lines}}
|
||||
// {{.}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue