Skip to content

Commit

Permalink
tests: update error outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
lucab committed Sep 25, 2024
1 parent d8ad5ce commit 3a05460
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions crates/uv/tests/show_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2536,6 +2536,7 @@ fn resolve_tool() -> anyhow::Result<()> {
from: None,
with: [],
with_requirements: [],
extra_entrypoints_packages: {},
python: None,
refresh: None(
Timestamp(
Expand Down
9 changes: 6 additions & 3 deletions crates/uv/tests/tool_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ fn tool_install_suggest_other_packages_with_executable() {
.env("UV_TOOL_DIR", tool_dir.as_os_str())
.env("XDG_BIN_HOME", bin_dir.as_os_str()), @r###"
success: false
exit_code: 1
exit_code: 2
----- stdout -----
No executables are provided by `fastapi`
However, an executable with the name `fastapi` is available via dependency `fastapi-cli`.
Expand Down Expand Up @@ -234,6 +234,7 @@ fn tool_install_suggest_other_packages_with_executable() {
+ uvicorn==0.29.0
+ watchfiles==0.21.0
+ websockets==12.0
error: Failed to install entrypoints for `fastapi`
"###);
}

Expand Down Expand Up @@ -557,7 +558,7 @@ fn tool_install_remove_on_empty() -> Result<()> {
.env("XDG_BIN_HOME", bin_dir.as_os_str())
.env("PATH", bin_dir.as_os_str()), @r###"
success: false
exit_code: 1
exit_code: 2
----- stdout -----
No executables are provided by `black`
Expand All @@ -573,6 +574,7 @@ fn tool_install_remove_on_empty() -> Result<()> {
- packaging==24.0
- pathspec==0.12.1
- platformdirs==4.2.0
error: Failed to install entrypoints for `black`
"###);

// Re-request `black`. It should reinstall, without requiring `--force`.
Expand Down Expand Up @@ -1375,7 +1377,7 @@ fn tool_install_no_entrypoints() {
.env("XDG_BIN_HOME", bin_dir.as_os_str())
.env("PATH", bin_dir.as_os_str()), @r###"
success: false
exit_code: 1
exit_code: 2
----- stdout -----
No executables are provided by `iniconfig`
Expand All @@ -1384,6 +1386,7 @@ fn tool_install_no_entrypoints() {
Prepared 1 package in [TIME]
Installed 1 package in [TIME]
+ iniconfig==2.0.0
error: Failed to install entrypoints for `iniconfig`
"###);
}

Expand Down

0 comments on commit 3a05460

Please sign in to comment.