mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Use uv sync
in workspace tests (#12181)
This commit is contained in:
parent
5880a98163
commit
2a9bade4df
18 changed files with 323 additions and 307 deletions
|
@ -1624,74 +1624,21 @@ mod tests {
|
||||||
{
|
{
|
||||||
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
|
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
|
||||||
},
|
},
|
||||||
@r###"
|
@r#"
|
||||||
{
|
|
||||||
"project_root": "[ROOT]/albatross-in-example/examples/bird-feeder",
|
|
||||||
"project_name": "bird-feeder",
|
|
||||||
"workspace": {
|
|
||||||
"install_path": "[ROOT]/albatross-in-example/examples/bird-feeder",
|
|
||||||
"packages": {
|
|
||||||
"bird-feeder": {
|
|
||||||
"root": "[ROOT]/albatross-in-example/examples/bird-feeder",
|
|
||||||
"project": {
|
|
||||||
"name": "bird-feeder",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"requires-python": ">=3.12",
|
|
||||||
"dependencies": [
|
|
||||||
"anyio>=4.3.0,<5"
|
|
||||||
],
|
|
||||||
"optional-dependencies": null
|
|
||||||
},
|
|
||||||
"pyproject_toml": "[PYPROJECT_TOML]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sources": {},
|
|
||||||
"indexes": [],
|
|
||||||
"pyproject_toml": {
|
|
||||||
"project": {
|
|
||||||
"name": "bird-feeder",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"requires-python": ">=3.12",
|
|
||||||
"dependencies": [
|
|
||||||
"anyio>=4.3.0,<5"
|
|
||||||
],
|
|
||||||
"optional-dependencies": null
|
|
||||||
},
|
|
||||||
"tool": null,
|
|
||||||
"dependency-groups": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"###);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
#[tokio::test]
|
|
||||||
async fn albatross_project_in_excluded() {
|
|
||||||
let (project, root_escaped) =
|
|
||||||
workspace_test("albatross-project-in-excluded/excluded/bird-feeder").await;
|
|
||||||
let filters = vec![(root_escaped.as_str(), "[ROOT]")];
|
|
||||||
insta::with_settings!({filters => filters}, {
|
|
||||||
assert_json_snapshot!(
|
|
||||||
project,
|
|
||||||
{
|
|
||||||
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
|
|
||||||
},
|
|
||||||
@r###"
|
|
||||||
{
|
{
|
||||||
"project_root": "[ROOT]/albatross-project-in-excluded/excluded/bird-feeder",
|
"project_root": "[ROOT]/albatross-in-example/examples/bird-feeder",
|
||||||
"project_name": "bird-feeder",
|
"project_name": "bird-feeder",
|
||||||
"workspace": {
|
"workspace": {
|
||||||
"install_path": "[ROOT]/albatross-project-in-excluded/excluded/bird-feeder",
|
"install_path": "[ROOT]/albatross-in-example/examples/bird-feeder",
|
||||||
"packages": {
|
"packages": {
|
||||||
"bird-feeder": {
|
"bird-feeder": {
|
||||||
"root": "[ROOT]/albatross-project-in-excluded/excluded/bird-feeder",
|
"root": "[ROOT]/albatross-in-example/examples/bird-feeder",
|
||||||
"project": {
|
"project": {
|
||||||
"name": "bird-feeder",
|
"name": "bird-feeder",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"requires-python": ">=3.12",
|
"requires-python": ">=3.12",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"anyio>=4.3.0,<5"
|
"iniconfig>=2,<3"
|
||||||
],
|
],
|
||||||
"optional-dependencies": null
|
"optional-dependencies": null
|
||||||
},
|
},
|
||||||
|
@ -1706,7 +1653,7 @@ mod tests {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"requires-python": ">=3.12",
|
"requires-python": ">=3.12",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"anyio>=4.3.0,<5"
|
"iniconfig>=2,<3"
|
||||||
],
|
],
|
||||||
"optional-dependencies": null
|
"optional-dependencies": null
|
||||||
},
|
},
|
||||||
|
@ -1715,7 +1662,60 @@ mod tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"###);
|
"#);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn albatross_project_in_excluded() {
|
||||||
|
let (project, root_escaped) =
|
||||||
|
workspace_test("albatross-project-in-excluded/excluded/bird-feeder").await;
|
||||||
|
let filters = vec![(root_escaped.as_str(), "[ROOT]")];
|
||||||
|
insta::with_settings!({filters => filters}, {
|
||||||
|
assert_json_snapshot!(
|
||||||
|
project,
|
||||||
|
{
|
||||||
|
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
|
||||||
|
},
|
||||||
|
@r#"
|
||||||
|
{
|
||||||
|
"project_root": "[ROOT]/albatross-project-in-excluded/excluded/bird-feeder",
|
||||||
|
"project_name": "bird-feeder",
|
||||||
|
"workspace": {
|
||||||
|
"install_path": "[ROOT]/albatross-project-in-excluded/excluded/bird-feeder",
|
||||||
|
"packages": {
|
||||||
|
"bird-feeder": {
|
||||||
|
"root": "[ROOT]/albatross-project-in-excluded/excluded/bird-feeder",
|
||||||
|
"project": {
|
||||||
|
"name": "bird-feeder",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"requires-python": ">=3.12",
|
||||||
|
"dependencies": [
|
||||||
|
"iniconfig>=2,<3"
|
||||||
|
],
|
||||||
|
"optional-dependencies": null
|
||||||
|
},
|
||||||
|
"pyproject_toml": "[PYPROJECT_TOML]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sources": {},
|
||||||
|
"indexes": [],
|
||||||
|
"pyproject_toml": {
|
||||||
|
"project": {
|
||||||
|
"name": "bird-feeder",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"requires-python": ">=3.12",
|
||||||
|
"dependencies": [
|
||||||
|
"iniconfig>=2,<3"
|
||||||
|
],
|
||||||
|
"optional-dependencies": null
|
||||||
|
},
|
||||||
|
"tool": null,
|
||||||
|
"dependency-groups": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"#);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1729,7 +1729,7 @@ mod tests {
|
||||||
{
|
{
|
||||||
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
|
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
|
||||||
},
|
},
|
||||||
@r###"
|
@r#"
|
||||||
{
|
{
|
||||||
"project_root": "[ROOT]/albatross-root-workspace",
|
"project_root": "[ROOT]/albatross-root-workspace",
|
||||||
"project_name": "albatross",
|
"project_name": "albatross",
|
||||||
|
@ -1744,7 +1744,7 @@ mod tests {
|
||||||
"requires-python": ">=3.12",
|
"requires-python": ">=3.12",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"bird-feeder",
|
"bird-feeder",
|
||||||
"tqdm>=4,<5"
|
"iniconfig>=2,<3"
|
||||||
],
|
],
|
||||||
"optional-dependencies": null
|
"optional-dependencies": null
|
||||||
},
|
},
|
||||||
|
@ -1757,7 +1757,7 @@ mod tests {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"requires-python": ">=3.8",
|
"requires-python": ">=3.8",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"anyio>=4.3.0,<5",
|
"iniconfig>=2,<3",
|
||||||
"seeds"
|
"seeds"
|
||||||
],
|
],
|
||||||
"optional-dependencies": null
|
"optional-dependencies": null
|
||||||
|
@ -1795,7 +1795,7 @@ mod tests {
|
||||||
"requires-python": ">=3.12",
|
"requires-python": ">=3.12",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"bird-feeder",
|
"bird-feeder",
|
||||||
"tqdm>=4,<5"
|
"iniconfig>=2,<3"
|
||||||
],
|
],
|
||||||
"optional-dependencies": null
|
"optional-dependencies": null
|
||||||
},
|
},
|
||||||
|
@ -1833,7 +1833,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"###);
|
"#);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1848,7 +1848,7 @@ mod tests {
|
||||||
{
|
{
|
||||||
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
|
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
|
||||||
},
|
},
|
||||||
@r###"
|
@r#"
|
||||||
{
|
{
|
||||||
"project_root": "[ROOT]/albatross-virtual-workspace/packages/albatross",
|
"project_root": "[ROOT]/albatross-virtual-workspace/packages/albatross",
|
||||||
"project_name": "albatross",
|
"project_name": "albatross",
|
||||||
|
@ -1863,7 +1863,7 @@ mod tests {
|
||||||
"requires-python": ">=3.12",
|
"requires-python": ">=3.12",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"bird-feeder",
|
"bird-feeder",
|
||||||
"tqdm>=4,<5"
|
"iniconfig>=2,<3"
|
||||||
],
|
],
|
||||||
"optional-dependencies": null
|
"optional-dependencies": null
|
||||||
},
|
},
|
||||||
|
@ -1927,7 +1927,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"###);
|
"#);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1941,45 +1941,45 @@ mod tests {
|
||||||
{
|
{
|
||||||
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
|
".workspace.packages.*.pyproject_toml" => "[PYPROJECT_TOML]"
|
||||||
},
|
},
|
||||||
@r###"
|
@r#"
|
||||||
{
|
{
|
||||||
"project_root": "[ROOT]/albatross-just-project",
|
"project_root": "[ROOT]/albatross-just-project",
|
||||||
"project_name": "albatross",
|
"project_name": "albatross",
|
||||||
"workspace": {
|
"workspace": {
|
||||||
"install_path": "[ROOT]/albatross-just-project",
|
"install_path": "[ROOT]/albatross-just-project",
|
||||||
"packages": {
|
"packages": {
|
||||||
"albatross": {
|
"albatross": {
|
||||||
"root": "[ROOT]/albatross-just-project",
|
"root": "[ROOT]/albatross-just-project",
|
||||||
"project": {
|
"project": {
|
||||||
"name": "albatross",
|
"name": "albatross",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"requires-python": ">=3.12",
|
"requires-python": ">=3.12",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"tqdm>=4,<5"
|
"iniconfig>=2,<3"
|
||||||
],
|
],
|
||||||
"optional-dependencies": null
|
"optional-dependencies": null
|
||||||
|
},
|
||||||
|
"pyproject_toml": "[PYPROJECT_TOML]"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"pyproject_toml": "[PYPROJECT_TOML]"
|
"sources": {},
|
||||||
|
"indexes": [],
|
||||||
|
"pyproject_toml": {
|
||||||
|
"project": {
|
||||||
|
"name": "albatross",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"requires-python": ">=3.12",
|
||||||
|
"dependencies": [
|
||||||
|
"iniconfig>=2,<3"
|
||||||
|
],
|
||||||
|
"optional-dependencies": null
|
||||||
|
},
|
||||||
|
"tool": null,
|
||||||
|
"dependency-groups": null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"sources": {},
|
|
||||||
"indexes": [],
|
|
||||||
"pyproject_toml": {
|
|
||||||
"project": {
|
|
||||||
"name": "albatross",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"requires-python": ">=3.12",
|
|
||||||
"dependencies": [
|
|
||||||
"tqdm>=4,<5"
|
|
||||||
],
|
|
||||||
"optional-dependencies": null
|
|
||||||
},
|
|
||||||
"tool": null,
|
|
||||||
"dependency-groups": null
|
|
||||||
}
|
}
|
||||||
}
|
"#);
|
||||||
}
|
|
||||||
"###);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ pub const INSTA_FILTERS: &[(&str, &str)] = &[
|
||||||
(r"tv_sec: \d+", "tv_sec: [TIME]"),
|
(r"tv_sec: \d+", "tv_sec: [TIME]"),
|
||||||
(r"tv_nsec: \d+", "tv_nsec: [TIME]"),
|
(r"tv_nsec: \d+", "tv_nsec: [TIME]"),
|
||||||
// Rewrite Windows output to Unix output
|
// Rewrite Windows output to Unix output
|
||||||
(r"\\([\w\d]|\.\.)", "/$1"),
|
(r"\\([\w\d]|\.)", "/$1"),
|
||||||
(r"uv\.exe", "uv"),
|
(r"uv\.exe", "uv"),
|
||||||
// uv version display
|
// uv version display
|
||||||
(
|
(
|
||||||
|
@ -1417,11 +1417,16 @@ pub fn run_and_format_with_status<T: AsRef<str>>(
|
||||||
if removed_packages > 0 {
|
if removed_packages > 0 {
|
||||||
for i in 1..20 {
|
for i in 1..20 {
|
||||||
for verb in match windows_filters {
|
for verb in match windows_filters {
|
||||||
WindowsFilters::Platform => {
|
WindowsFilters::Platform => [
|
||||||
["Resolved", "Prepared", "Installed", "Uninstalled"].iter()
|
"Resolved",
|
||||||
}
|
"Prepared",
|
||||||
|
"Installed",
|
||||||
|
"Audited",
|
||||||
|
"Uninstalled",
|
||||||
|
]
|
||||||
|
.iter(),
|
||||||
WindowsFilters::Universal => {
|
WindowsFilters::Universal => {
|
||||||
["Prepared", "Installed", "Uninstalled"].iter()
|
["Prepared", "Installed", "Audited", "Uninstalled"].iter()
|
||||||
}
|
}
|
||||||
} {
|
} {
|
||||||
snapshot = snapshot.replace(
|
snapshot = snapshot.replace(
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::PathBuf;
|
||||||
use std::process::Command;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assert_cmd::assert::OutputAssertExt;
|
use assert_cmd::assert::OutputAssertExt;
|
||||||
|
@ -13,12 +12,6 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::common::{copy_dir_ignore, make_project, uv_snapshot, TestContext};
|
use crate::common::{copy_dir_ignore, make_project, uv_snapshot, TestContext};
|
||||||
|
|
||||||
fn install_workspace(context: &TestContext, current_dir: &Path) -> Command {
|
|
||||||
let mut command = context.pip_install();
|
|
||||||
command.arg("-e").arg(current_dir);
|
|
||||||
command
|
|
||||||
}
|
|
||||||
|
|
||||||
fn workspaces_dir() -> PathBuf {
|
fn workspaces_dir() -> PathBuf {
|
||||||
env::current_dir()
|
env::current_dir()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
@ -35,7 +28,6 @@ fn test_albatross_in_examples_bird_feeder() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
let workspace = context.temp_dir.child("workspace");
|
let workspace = context.temp_dir.child("workspace");
|
||||||
|
|
||||||
// Copy into the temporary directory
|
|
||||||
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
||||||
|
|
||||||
let current_dir = workspace
|
let current_dir = workspace
|
||||||
|
@ -43,31 +35,32 @@ fn test_albatross_in_examples_bird_feeder() {
|
||||||
.join("examples")
|
.join("examples")
|
||||||
.join("bird-feeder");
|
.join("bird-feeder");
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 4 packages in [TIME]
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
Prepared 4 packages in [TIME]
|
Creating virtual environment at: .venv
|
||||||
Installed 4 packages in [TIME]
|
Resolved 2 packages in [TIME]
|
||||||
+ anyio==4.3.0
|
Prepared 2 packages in [TIME]
|
||||||
|
Installed 2 packages in [TIME]
|
||||||
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-in-example/examples/bird-feeder)
|
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-in-example/examples/bird-feeder)
|
||||||
+ idna==3.6
|
+ iniconfig==2.0.0
|
||||||
+ sniffio==1.3.1
|
"
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Audited 1 package in [TIME]
|
Resolved 2 packages in [TIME]
|
||||||
"###
|
Audited 2 packages in [TIME]
|
||||||
|
"
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
||||||
|
@ -78,34 +71,36 @@ fn test_albatross_in_examples() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
let workspace = context.temp_dir.child("workspace");
|
let workspace = context.temp_dir.child("workspace");
|
||||||
|
|
||||||
// Copy into the temporary directory
|
|
||||||
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
||||||
|
|
||||||
let current_dir = workspace.join("albatross-in-example");
|
let current_dir = workspace.join("albatross-in-example");
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
|
success: true
|
||||||
|
exit_code: 0
|
||||||
|
----- stdout -----
|
||||||
|
|
||||||
|
----- stderr -----
|
||||||
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
|
Creating virtual environment at: .venv
|
||||||
|
Resolved 2 packages in [TIME]
|
||||||
|
Prepared 2 packages in [TIME]
|
||||||
|
Installed 2 packages in [TIME]
|
||||||
|
+ albatross==0.1.0 (from file://[TEMP_DIR]/workspace/albatross-in-example)
|
||||||
|
+ iniconfig==2.0.0
|
||||||
|
"
|
||||||
|
);
|
||||||
|
|
||||||
|
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
||||||
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 2 packages in [TIME]
|
Resolved 2 packages in [TIME]
|
||||||
Prepared 2 packages in [TIME]
|
Audited 2 packages in [TIME]
|
||||||
Installed 2 packages in [TIME]
|
"
|
||||||
+ albatross==0.1.0 (from file://[TEMP_DIR]/workspace/albatross-in-example)
|
|
||||||
+ tqdm==4.66.2
|
|
||||||
"###
|
|
||||||
);
|
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
|
||||||
success: true
|
|
||||||
exit_code: 0
|
|
||||||
----- stdout -----
|
|
||||||
|
|
||||||
----- stderr -----
|
|
||||||
Audited 1 package in [TIME]
|
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
||||||
|
@ -116,34 +111,36 @@ fn test_albatross_just_project() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
let workspace = context.temp_dir.child("workspace");
|
let workspace = context.temp_dir.child("workspace");
|
||||||
|
|
||||||
// Copy into the temporary directory
|
|
||||||
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
||||||
|
|
||||||
let current_dir = workspace.join("albatross-just-project");
|
let current_dir = workspace.join("albatross-just-project");
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
|
success: true
|
||||||
|
exit_code: 0
|
||||||
|
----- stdout -----
|
||||||
|
|
||||||
|
----- stderr -----
|
||||||
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
|
Creating virtual environment at: .venv
|
||||||
|
Resolved 2 packages in [TIME]
|
||||||
|
Prepared 2 packages in [TIME]
|
||||||
|
Installed 2 packages in [TIME]
|
||||||
|
+ albatross==0.1.0 (from file://[TEMP_DIR]/workspace/albatross-just-project)
|
||||||
|
+ iniconfig==2.0.0
|
||||||
|
"
|
||||||
|
);
|
||||||
|
|
||||||
|
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
||||||
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 2 packages in [TIME]
|
Resolved 2 packages in [TIME]
|
||||||
Prepared 2 packages in [TIME]
|
Audited 2 packages in [TIME]
|
||||||
Installed 2 packages in [TIME]
|
"
|
||||||
+ albatross==0.1.0 (from file://[TEMP_DIR]/workspace/albatross-just-project)
|
|
||||||
+ tqdm==4.66.2
|
|
||||||
"###
|
|
||||||
);
|
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
|
||||||
success: true
|
|
||||||
exit_code: 0
|
|
||||||
----- stdout -----
|
|
||||||
|
|
||||||
----- stderr -----
|
|
||||||
Audited 1 package in [TIME]
|
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
||||||
|
@ -154,39 +151,57 @@ fn test_albatross_project_in_excluded() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
let workspace = context.temp_dir.child("workspace");
|
let workspace = context.temp_dir.child("workspace");
|
||||||
|
|
||||||
// Copy into the temporary directory
|
|
||||||
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
||||||
|
|
||||||
|
let current_dir = workspace.join("albatross-project-in-excluded");
|
||||||
|
|
||||||
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
|
success: true
|
||||||
|
exit_code: 0
|
||||||
|
----- stdout -----
|
||||||
|
|
||||||
|
----- stderr -----
|
||||||
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
|
Creating virtual environment at: .venv
|
||||||
|
Resolved 2 packages in [TIME]
|
||||||
|
Prepared 2 packages in [TIME]
|
||||||
|
Installed 2 packages in [TIME]
|
||||||
|
+ albatross==0.1.0 (from file://[TEMP_DIR]/workspace/albatross-project-in-excluded)
|
||||||
|
+ iniconfig==2.0.0
|
||||||
|
"
|
||||||
|
);
|
||||||
|
|
||||||
let current_dir = workspace
|
let current_dir = workspace
|
||||||
.join("albatross-project-in-excluded")
|
.join("albatross-project-in-excluded")
|
||||||
.join("excluded")
|
.join("excluded")
|
||||||
.join("bird-feeder");
|
.join("bird-feeder");
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 4 packages in [TIME]
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
Prepared 4 packages in [TIME]
|
Creating virtual environment at: .venv
|
||||||
Installed 4 packages in [TIME]
|
Resolved 2 packages in [TIME]
|
||||||
+ anyio==4.3.0
|
Prepared 1 package in [TIME]
|
||||||
|
Installed 2 packages in [TIME]
|
||||||
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-project-in-excluded/excluded/bird-feeder)
|
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-project-in-excluded/excluded/bird-feeder)
|
||||||
+ idna==3.6
|
+ iniconfig==2.0.0
|
||||||
+ sniffio==1.3.1
|
"
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Audited 1 package in [TIME]
|
Resolved 2 packages in [TIME]
|
||||||
"###
|
Audited 2 packages in [TIME]
|
||||||
|
"
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
||||||
|
@ -195,17 +210,14 @@ fn test_albatross_project_in_excluded() {
|
||||||
.join("albatross-project-in-excluded")
|
.join("albatross-project-in-excluded")
|
||||||
.join("packages")
|
.join("packages")
|
||||||
.join("seeds");
|
.join("seeds");
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: false
|
||||||
exit_code: 0
|
exit_code: 2
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 2 packages in [TIME]
|
error: The project is marked as unmanaged: `[TEMP_DIR]/workspace/albatross-project-in-excluded/packages/seeds`
|
||||||
Prepared 1 package in [TIME]
|
"
|
||||||
Installed 1 package in [TIME]
|
|
||||||
+ seeds==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-project-in-excluded/packages/seeds)
|
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,39 +226,39 @@ fn test_albatross_root_workspace() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
let workspace = context.temp_dir.child("workspace");
|
let workspace = context.temp_dir.child("workspace");
|
||||||
|
|
||||||
// Copy into the temporary directory
|
|
||||||
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
||||||
|
|
||||||
let current_dir = workspace.join("albatross-root-workspace");
|
let current_dir = workspace.join("albatross-root-workspace");
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 7 packages in [TIME]
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
Prepared 7 packages in [TIME]
|
Creating virtual environment at: .venv
|
||||||
Installed 7 packages in [TIME]
|
Resolved 5 packages in [TIME]
|
||||||
|
Prepared 5 packages in [TIME]
|
||||||
|
Installed 5 packages in [TIME]
|
||||||
+ albatross==0.1.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace)
|
+ albatross==0.1.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace)
|
||||||
+ anyio==4.3.0
|
|
||||||
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/bird-feeder)
|
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/bird-feeder)
|
||||||
+ idna==3.6
|
+ idna==3.6
|
||||||
|
+ iniconfig==2.0.0
|
||||||
+ seeds==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/seeds)
|
+ seeds==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/seeds)
|
||||||
+ sniffio==1.3.1
|
"
|
||||||
+ tqdm==4.66.2
|
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Audited 1 package in [TIME]
|
Resolved 5 packages in [TIME]
|
||||||
"###
|
Audited 5 packages in [TIME]
|
||||||
|
"
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
||||||
|
@ -257,7 +269,6 @@ fn test_albatross_root_workspace_bird_feeder() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
let workspace = context.temp_dir.child("workspace");
|
let workspace = context.temp_dir.child("workspace");
|
||||||
|
|
||||||
// Copy into the temporary directory
|
|
||||||
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
||||||
|
|
||||||
let current_dir = workspace
|
let current_dir = workspace
|
||||||
|
@ -265,32 +276,34 @@ fn test_albatross_root_workspace_bird_feeder() {
|
||||||
.join("packages")
|
.join("packages")
|
||||||
.join("bird-feeder");
|
.join("bird-feeder");
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
|
success: true
|
||||||
|
exit_code: 0
|
||||||
|
----- stdout -----
|
||||||
|
|
||||||
|
----- stderr -----
|
||||||
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
|
Creating virtual environment at: [TEMP_DIR]/workspace/albatross-root-workspace/.venv
|
||||||
|
Resolved 5 packages in [TIME]
|
||||||
|
Prepared 4 packages in [TIME]
|
||||||
|
Installed 4 packages in [TIME]
|
||||||
|
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/bird-feeder)
|
||||||
|
+ idna==3.6
|
||||||
|
+ iniconfig==2.0.0
|
||||||
|
+ seeds==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/seeds)
|
||||||
|
"
|
||||||
|
);
|
||||||
|
|
||||||
|
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
||||||
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 5 packages in [TIME]
|
Resolved 5 packages in [TIME]
|
||||||
Prepared 5 packages in [TIME]
|
Audited 4 packages in [TIME]
|
||||||
Installed 5 packages in [TIME]
|
"
|
||||||
+ anyio==4.3.0
|
|
||||||
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/bird-feeder)
|
|
||||||
+ idna==3.6
|
|
||||||
+ seeds==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/seeds)
|
|
||||||
+ sniffio==1.3.1
|
|
||||||
"###
|
|
||||||
);
|
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
|
||||||
success: true
|
|
||||||
exit_code: 0
|
|
||||||
----- stdout -----
|
|
||||||
|
|
||||||
----- stderr -----
|
|
||||||
Audited 1 package in [TIME]
|
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
||||||
|
@ -301,7 +314,6 @@ fn test_albatross_root_workspace_albatross() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
let workspace = context.temp_dir.child("workspace");
|
let workspace = context.temp_dir.child("workspace");
|
||||||
|
|
||||||
// Copy into the temporary directory
|
|
||||||
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
||||||
|
|
||||||
let current_dir = workspace
|
let current_dir = workspace
|
||||||
|
@ -309,32 +321,34 @@ fn test_albatross_root_workspace_albatross() {
|
||||||
.join("packages")
|
.join("packages")
|
||||||
.join("bird-feeder");
|
.join("bird-feeder");
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
|
success: true
|
||||||
|
exit_code: 0
|
||||||
|
----- stdout -----
|
||||||
|
|
||||||
|
----- stderr -----
|
||||||
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
|
Creating virtual environment at: [TEMP_DIR]/workspace/albatross-root-workspace/.venv
|
||||||
|
Resolved 5 packages in [TIME]
|
||||||
|
Prepared 4 packages in [TIME]
|
||||||
|
Installed 4 packages in [TIME]
|
||||||
|
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/bird-feeder)
|
||||||
|
+ idna==3.6
|
||||||
|
+ iniconfig==2.0.0
|
||||||
|
+ seeds==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/seeds)
|
||||||
|
"
|
||||||
|
);
|
||||||
|
|
||||||
|
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
||||||
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 5 packages in [TIME]
|
Resolved 5 packages in [TIME]
|
||||||
Prepared 5 packages in [TIME]
|
Audited 4 packages in [TIME]
|
||||||
Installed 5 packages in [TIME]
|
"
|
||||||
+ anyio==4.3.0
|
|
||||||
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/bird-feeder)
|
|
||||||
+ idna==3.6
|
|
||||||
+ seeds==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-root-workspace/packages/seeds)
|
|
||||||
+ sniffio==1.3.1
|
|
||||||
"###
|
|
||||||
);
|
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
|
||||||
success: true
|
|
||||||
exit_code: 0
|
|
||||||
----- stdout -----
|
|
||||||
|
|
||||||
----- stderr -----
|
|
||||||
Audited 1 package in [TIME]
|
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
context.assert_file(current_dir.join("check_installed_albatross.py"));
|
||||||
|
@ -345,7 +359,6 @@ fn test_albatross_virtual_workspace() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
let workspace = context.temp_dir.child("workspace");
|
let workspace = context.temp_dir.child("workspace");
|
||||||
|
|
||||||
// Copy into the temporary directory
|
|
||||||
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
copy_dir_ignore(workspaces_dir(), &workspace).unwrap();
|
||||||
|
|
||||||
let current_dir = workspace
|
let current_dir = workspace
|
||||||
|
@ -353,13 +366,15 @@ fn test_albatross_virtual_workspace() {
|
||||||
.join("packages")
|
.join("packages")
|
||||||
.join("bird-feeder");
|
.join("bird-feeder");
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 5 packages in [TIME]
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
|
Creating virtual environment at: [TEMP_DIR]/workspace/albatross-virtual-workspace/.venv
|
||||||
|
Resolved 7 packages in [TIME]
|
||||||
Prepared 5 packages in [TIME]
|
Prepared 5 packages in [TIME]
|
||||||
Installed 5 packages in [TIME]
|
Installed 5 packages in [TIME]
|
||||||
+ anyio==4.3.0
|
+ anyio==4.3.0
|
||||||
|
@ -367,18 +382,19 @@ fn test_albatross_virtual_workspace() {
|
||||||
+ idna==3.6
|
+ idna==3.6
|
||||||
+ seeds==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-virtual-workspace/packages/seeds)
|
+ seeds==1.0.0 (from file://[TEMP_DIR]/workspace/albatross-virtual-workspace/packages/seeds)
|
||||||
+ sniffio==1.3.1
|
+ sniffio==1.3.1
|
||||||
"###
|
"
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
||||||
uv_snapshot!(context.filters(), install_workspace(&context, ¤t_dir), @r###"
|
uv_snapshot!(context.filters(), context.sync().current_dir(¤t_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Audited 1 package in [TIME]
|
Resolved 7 packages in [TIME]
|
||||||
"###
|
Audited 5 packages in [TIME]
|
||||||
|
"
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
context.assert_file(current_dir.join("check_installed_bird_feeder.py"));
|
||||||
|
@ -407,7 +423,7 @@ fn test_uv_run_with_package_virtual_workspace() -> Result<()> {
|
||||||
.arg("--package")
|
.arg("--package")
|
||||||
.arg("bird-feeder")
|
.arg("bird-feeder")
|
||||||
.arg("packages/bird-feeder/check_installed_bird_feeder.py")
|
.arg("packages/bird-feeder/check_installed_bird_feeder.py")
|
||||||
.current_dir(&work_dir), @r###"
|
.current_dir(&work_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
@ -417,7 +433,7 @@ fn test_uv_run_with_package_virtual_workspace() -> Result<()> {
|
||||||
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
||||||
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
Creating virtual environment at: .venv
|
Creating virtual environment at: .venv
|
||||||
Resolved 8 packages in [TIME]
|
Resolved 7 packages in [TIME]
|
||||||
Prepared 5 packages in [TIME]
|
Prepared 5 packages in [TIME]
|
||||||
Installed 5 packages in [TIME]
|
Installed 5 packages in [TIME]
|
||||||
+ anyio==4.3.0
|
+ anyio==4.3.0
|
||||||
|
@ -425,15 +441,15 @@ fn test_uv_run_with_package_virtual_workspace() -> Result<()> {
|
||||||
+ idna==3.6
|
+ idna==3.6
|
||||||
+ seeds==1.0.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/seeds)
|
+ seeds==1.0.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/seeds)
|
||||||
+ sniffio==1.3.1
|
+ sniffio==1.3.1
|
||||||
"###
|
"
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), universal_windows_filters=true, context
|
uv_snapshot!(context.filters(), context
|
||||||
.run()
|
.run()
|
||||||
.arg("--package")
|
.arg("--package")
|
||||||
.arg("albatross")
|
.arg("albatross")
|
||||||
.arg("packages/albatross/check_installed_albatross.py")
|
.arg("packages/albatross/check_installed_albatross.py")
|
||||||
.current_dir(&work_dir), @r###"
|
.current_dir(&work_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
@ -441,12 +457,12 @@ fn test_uv_run_with_package_virtual_workspace() -> Result<()> {
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
||||||
Resolved 8 packages in [TIME]
|
Resolved 7 packages in [TIME]
|
||||||
Prepared 2 packages in [TIME]
|
Prepared 2 packages in [TIME]
|
||||||
Installed 2 packages in [TIME]
|
Installed 2 packages in [TIME]
|
||||||
+ albatross==0.1.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/albatross)
|
+ albatross==0.1.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/albatross)
|
||||||
+ tqdm==4.66.2
|
+ iniconfig==2.0.0
|
||||||
"###
|
"
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -464,10 +480,10 @@ fn test_uv_run_virtual_workspace_root() -> Result<()> {
|
||||||
&work_dir,
|
&work_dir,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), universal_windows_filters=true, context
|
uv_snapshot!(context.filters(), context
|
||||||
.run()
|
.run()
|
||||||
.arg("packages/albatross/check_installed_albatross.py")
|
.arg("packages/albatross/check_installed_albatross.py")
|
||||||
.current_dir(&work_dir), @r###"
|
.current_dir(&work_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
@ -477,17 +493,17 @@ fn test_uv_run_virtual_workspace_root() -> Result<()> {
|
||||||
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
||||||
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
Creating virtual environment at: .venv
|
Creating virtual environment at: .venv
|
||||||
Resolved 8 packages in [TIME]
|
Resolved 7 packages in [TIME]
|
||||||
Prepared 7 packages in [TIME]
|
Prepared 7 packages in [TIME]
|
||||||
Installed 7 packages in [TIME]
|
Installed 7 packages in [TIME]
|
||||||
+ albatross==0.1.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/albatross)
|
+ albatross==0.1.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/albatross)
|
||||||
+ anyio==4.3.0
|
+ anyio==4.3.0
|
||||||
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/bird-feeder)
|
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/bird-feeder)
|
||||||
+ idna==3.6
|
+ idna==3.6
|
||||||
|
+ iniconfig==2.0.0
|
||||||
+ seeds==1.0.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/seeds)
|
+ seeds==1.0.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/seeds)
|
||||||
+ sniffio==1.3.1
|
+ sniffio==1.3.1
|
||||||
+ tqdm==4.66.2
|
"
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -512,7 +528,7 @@ fn test_uv_run_with_package_root_workspace() -> Result<()> {
|
||||||
.arg("--package")
|
.arg("--package")
|
||||||
.arg("bird-feeder")
|
.arg("bird-feeder")
|
||||||
.arg("packages/bird-feeder/check_installed_bird_feeder.py")
|
.arg("packages/bird-feeder/check_installed_bird_feeder.py")
|
||||||
.current_dir(&work_dir), @r###"
|
.current_dir(&work_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
@ -522,23 +538,22 @@ fn test_uv_run_with_package_root_workspace() -> Result<()> {
|
||||||
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
||||||
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
Creating virtual environment at: .venv
|
Creating virtual environment at: .venv
|
||||||
Resolved 8 packages in [TIME]
|
Resolved 5 packages in [TIME]
|
||||||
Prepared 5 packages in [TIME]
|
Prepared 4 packages in [TIME]
|
||||||
Installed 5 packages in [TIME]
|
Installed 4 packages in [TIME]
|
||||||
+ anyio==4.3.0
|
|
||||||
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/bird-feeder)
|
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/bird-feeder)
|
||||||
+ idna==3.6
|
+ idna==3.6
|
||||||
|
+ iniconfig==2.0.0
|
||||||
+ seeds==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/seeds)
|
+ seeds==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/seeds)
|
||||||
+ sniffio==1.3.1
|
"
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), universal_windows_filters=true, context
|
uv_snapshot!(context.filters(), context
|
||||||
.run()
|
.run()
|
||||||
.arg("--package")
|
.arg("--package")
|
||||||
.arg("albatross")
|
.arg("albatross")
|
||||||
.arg("check_installed_albatross.py")
|
.arg("check_installed_albatross.py")
|
||||||
.current_dir(&work_dir), @r###"
|
.current_dir(&work_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
@ -546,12 +561,11 @@ fn test_uv_run_with_package_root_workspace() -> Result<()> {
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
||||||
Resolved 8 packages in [TIME]
|
Resolved 5 packages in [TIME]
|
||||||
Prepared 2 packages in [TIME]
|
Prepared 1 package in [TIME]
|
||||||
Installed 2 packages in [TIME]
|
Installed 1 package in [TIME]
|
||||||
+ albatross==0.1.0 (from file://[TEMP_DIR]/albatross-root-workspace)
|
+ albatross==0.1.0 (from file://[TEMP_DIR]/albatross-root-workspace)
|
||||||
+ tqdm==4.66.2
|
"
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -572,12 +586,12 @@ fn test_uv_run_isolate() -> Result<()> {
|
||||||
));
|
));
|
||||||
|
|
||||||
// Install the root package.
|
// Install the root package.
|
||||||
uv_snapshot!(context.filters(), universal_windows_filters=true, context
|
uv_snapshot!(context.filters(), context
|
||||||
.run()
|
.run()
|
||||||
.arg("--package")
|
.arg("--package")
|
||||||
.arg("albatross")
|
.arg("albatross")
|
||||||
.arg("check_installed_albatross.py")
|
.arg("check_installed_albatross.py")
|
||||||
.current_dir(&work_dir), @r###"
|
.current_dir(&work_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
@ -587,17 +601,15 @@ fn test_uv_run_isolate() -> Result<()> {
|
||||||
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
||||||
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
|
||||||
Creating virtual environment at: .venv
|
Creating virtual environment at: .venv
|
||||||
Resolved 8 packages in [TIME]
|
Resolved 5 packages in [TIME]
|
||||||
Prepared 7 packages in [TIME]
|
Prepared 5 packages in [TIME]
|
||||||
Installed 7 packages in [TIME]
|
Installed 5 packages in [TIME]
|
||||||
+ albatross==0.1.0 (from file://[TEMP_DIR]/albatross-root-workspace)
|
+ albatross==0.1.0 (from file://[TEMP_DIR]/albatross-root-workspace)
|
||||||
+ anyio==4.3.0
|
|
||||||
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/bird-feeder)
|
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/bird-feeder)
|
||||||
+ idna==3.6
|
+ idna==3.6
|
||||||
|
+ iniconfig==2.0.0
|
||||||
+ seeds==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/seeds)
|
+ seeds==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/seeds)
|
||||||
+ sniffio==1.3.1
|
"
|
||||||
+ tqdm==4.66.2
|
|
||||||
"###
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Run in `bird-feeder`. We shouldn't be able to import `albatross`, but we _can_ due to our
|
// Run in `bird-feeder`. We shouldn't be able to import `albatross`, but we _can_ due to our
|
||||||
|
@ -608,7 +620,7 @@ fn test_uv_run_isolate() -> Result<()> {
|
||||||
.arg("--package")
|
.arg("--package")
|
||||||
.arg("bird-feeder")
|
.arg("bird-feeder")
|
||||||
.arg("check_installed_albatross.py")
|
.arg("check_installed_albatross.py")
|
||||||
.current_dir(&work_dir), @r###"
|
.current_dir(&work_dir), @r"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
@ -616,9 +628,9 @@ fn test_uv_run_isolate() -> Result<()> {
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
|
||||||
Resolved 8 packages in [TIME]
|
Resolved 5 packages in [TIME]
|
||||||
Audited 5 packages in [TIME]
|
Audited 4 packages in [TIME]
|
||||||
"###
|
"
|
||||||
);
|
);
|
||||||
|
|
||||||
// If we `--isolated`, though, we use an isolated virtual environment, so `albatross` is not
|
// If we `--isolated`, though, we use an isolated virtual environment, so `albatross` is not
|
||||||
|
@ -631,24 +643,23 @@ fn test_uv_run_isolate() -> Result<()> {
|
||||||
.arg("--package")
|
.arg("--package")
|
||||||
.arg("bird-feeder")
|
.arg("bird-feeder")
|
||||||
.arg("check_installed_albatross.py")
|
.arg("check_installed_albatross.py")
|
||||||
.current_dir(&work_dir), @r###"
|
.current_dir(&work_dir), @r#"
|
||||||
success: false
|
success: false
|
||||||
exit_code: 1
|
exit_code: 1
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
Resolved 8 packages in [TIME]
|
Resolved 5 packages in [TIME]
|
||||||
Installed 5 packages in [TIME]
|
Installed 4 packages in [TIME]
|
||||||
+ anyio==4.3.0
|
|
||||||
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/bird-feeder)
|
+ bird-feeder==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/bird-feeder)
|
||||||
+ idna==3.6
|
+ idna==3.6
|
||||||
|
+ iniconfig==2.0.0
|
||||||
+ seeds==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/seeds)
|
+ seeds==1.0.0 (from file://[TEMP_DIR]/albatross-root-workspace/packages/seeds)
|
||||||
+ sniffio==1.3.1
|
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
File "[TEMP_DIR]/albatross-root-workspace/check_installed_albatross.py", line 1, in <module>
|
File "[TEMP_DIR]/albatross-root-workspace/check_installed_albatross.py", line 1, in <module>
|
||||||
from albatross import fly
|
from albatross import fly
|
||||||
ModuleNotFoundError: No module named 'albatross'
|
ModuleNotFoundError: No module named 'albatross'
|
||||||
"###
|
"#
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
name = "bird-feeder"
|
name = "bird-feeder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = ["anyio>=4.3.0,<5"]
|
dependencies = ["iniconfig>=2,<3"]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["hatchling"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import anyio
|
import iniconfig
|
||||||
|
|
||||||
|
|
||||||
def use():
|
def use():
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
name = "albatross"
|
name = "albatross"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = ["tqdm>=4,<5"]
|
dependencies = ["iniconfig>=2,<3"]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["hatchling"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import tqdm
|
import iniconfig
|
||||||
|
|
||||||
|
|
||||||
def fly():
|
def fly():
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
name = "albatross"
|
name = "albatross"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = ["tqdm>=4,<5"]
|
dependencies = ["iniconfig>=2,<3"]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["hatchling"]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
name = "bird-feeder"
|
name = "bird-feeder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = ["anyio>=4.3.0,<5"]
|
dependencies = ["iniconfig>=2,<3"]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["hatchling"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import anyio
|
import iniconfig
|
||||||
|
|
||||||
|
|
||||||
def use():
|
def use():
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
name = "albatross"
|
name = "albatross"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = ["tqdm>=4,<5"]
|
dependencies = ["iniconfig>=2,<3"]
|
||||||
|
|
||||||
[tool.uv.workspace]
|
[tool.uv.workspace]
|
||||||
members = ["packages/*"]
|
members = ["packages/*"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import tqdm
|
import iniconfig
|
||||||
from bird_feeder import use
|
from bird_feeder import use
|
||||||
|
|
||||||
print("Caw")
|
print("Caw")
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
name = "bird-feeder"
|
name = "bird-feeder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
dependencies = ["anyio>=4.3.0,<5", "seeds"]
|
dependencies = ["iniconfig>=2,<3", "seeds"]
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
seeds = { workspace = true }
|
seeds = { workspace = true }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import anyio
|
import iniconfig
|
||||||
|
|
||||||
|
|
||||||
def use():
|
def use():
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
name = "albatross"
|
name = "albatross"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = ["bird-feeder", "tqdm>=4,<5"]
|
dependencies = ["bird-feeder", "iniconfig>=2,<3"]
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
bird-feeder = { workspace = true }
|
bird-feeder = { workspace = true }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import tqdm
|
import iniconfig
|
||||||
from bird_feeder import use
|
from bird_feeder import use
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
name = "albatross"
|
name = "albatross"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = ["bird-feeder", "tqdm>=4,<5"]
|
dependencies = ["bird-feeder", "iniconfig>=2,<3"]
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
bird-feeder = { workspace = true }
|
bird-feeder = { workspace = true }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import tqdm
|
import iniconfig
|
||||||
from bird_feeder import use
|
from bird_feeder import use
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue