forked from astral-sh/rye
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'astral-sh:main' into main
- Loading branch information
Showing
6 changed files
with
29 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
use std::env::consts::EXE_EXTENSION; | ||
use std::fs; | ||
use tempfile::TempDir; | ||
|
||
use crate::common::{rye_cmd_snapshot, Space}; | ||
|
||
|
@@ -9,6 +10,9 @@ mod common; | |
fn test_basic_tool_behavior() { | ||
let space = Space::new(); | ||
|
||
// Cache alongside the home directory, so that the cache lives alongside the tools directory. | ||
let cache_dir = TempDir::new_in(space.rye_home()).unwrap(); | ||
|
||
// in case we left things behind from last run. | ||
fs::remove_dir_all(space.rye_home().join("tools")).ok(); | ||
fs::remove_file( | ||
|
@@ -22,6 +26,7 @@ fn test_basic_tool_behavior() { | |
|
||
rye_cmd_snapshot!( | ||
space.rye_cmd() | ||
.env("UV_CACHE_DIR", cache_dir.path()) | ||
.arg("tools") | ||
.arg("install") | ||
.arg("pycowsay") | ||
|
@@ -43,6 +48,7 @@ fn test_basic_tool_behavior() { | |
|
||
rye_cmd_snapshot!( | ||
space.rye_cmd() | ||
.env("UV_CACHE_DIR", cache_dir.path()) | ||
.arg("tools") | ||
.arg("list"), @r###" | ||
success: true | ||
|
@@ -55,6 +61,7 @@ fn test_basic_tool_behavior() { | |
|
||
rye_cmd_snapshot!( | ||
space.rye_cmd() | ||
.env("UV_CACHE_DIR", cache_dir.path()) | ||
.arg("tools") | ||
.arg("list") | ||
.arg("--include-version"), @r###" | ||
|
@@ -68,6 +75,7 @@ fn test_basic_tool_behavior() { | |
|
||
rye_cmd_snapshot!( | ||
space.rye_cmd() | ||
.env("UV_CACHE_DIR", cache_dir.path()) | ||
.arg("toolchain") | ||
.arg("remove") | ||
.arg("[email protected]"), @r###" | ||
|
@@ -81,6 +89,7 @@ fn test_basic_tool_behavior() { | |
|
||
rye_cmd_snapshot!( | ||
space.rye_cmd() | ||
.env("UV_CACHE_DIR", cache_dir.path()) | ||
.arg("tools") | ||
.arg("uninstall") | ||
.arg("pycowsay"), @r###" | ||
|