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.
- Loading branch information
Showing
5 changed files
with
107 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,8 @@ fn test_add_flask() { | |
----- stdout ----- | ||
Initializing new virtualenv in [TEMP_PATH]/project/.venv | ||
Python version: [email protected] | ||
Added colorama>=0.4.6 as regular dependency | ||
Added flask>=3.0.0 as regular dependency | ||
Added colorama>=0.4.6 as regular dependency | ||
Reusing already existing virtualenv | ||
Generating production lockfile: [TEMP_PATH]/project/requirements.lock | ||
Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock | ||
|
@@ -42,6 +42,50 @@ fn test_add_flask() { | |
"###); | ||
} | ||
|
||
#[test] | ||
fn test_add_flask_dotenv() { | ||
let space = Space::new(); | ||
space.init("my-project"); | ||
// add colorama to ensure we have this as a dependency on all platforms | ||
rye_cmd_snapshot!(space.rye_cmd().arg("add").arg("flask[dotenv]").arg("colorama"), @r###" | ||
success: true | ||
exit_code: 0 | ||
----- stdout ----- | ||
Initializing new virtualenv in [TEMP_PATH]/project/.venv | ||
Python version: [email protected] | ||
Added flask[dotenv]>=3.0.0 as regular dependency | ||
Added colorama>=0.4.6 as regular dependency | ||
Reusing already existing virtualenv | ||
Generating production lockfile: [TEMP_PATH]/project/requirements.lock | ||
Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock | ||
Installing dependencies | ||
Done! | ||
----- stderr ----- | ||
Built 1 editable in [EXECUTION_TIME] | ||
Resolved 9 packages in [EXECUTION_TIME] | ||
Downloaded 9 packages in [EXECUTION_TIME] | ||
Installed 10 packages in [EXECUTION_TIME] | ||
+ blinker==1.7.0 | ||
+ click==8.1.7 | ||
+ colorama==0.4.6 | ||
+ flask==3.0.0 | ||
+ itsdangerous==2.1.2 | ||
+ jinja2==3.1.2 | ||
+ markupsafe==2.1.3 | ||
+ my-project==0.1.0 (from file:[TEMP_PATH]/project) | ||
+ python-dotenv==1.0.0 | ||
+ werkzeug==3.0.1 | ||
"###); | ||
|
||
space.load_toml("pyproject.toml", |doc| { | ||
let deps = doc["project"]["dependencies"].as_array().unwrap(); | ||
assert!(deps | ||
.iter() | ||
.any(|x| x.as_str() == Some("flask[dotenv]>=3.0.0"))); | ||
}); | ||
} | ||
|
||
#[test] | ||
fn test_add_from_find_links() { | ||
let space = Space::new(); | ||
|
@@ -62,8 +106,8 @@ fn test_add_from_find_links() { | |
----- stdout ----- | ||
Initializing new virtualenv in [TEMP_PATH]/project/.venv | ||
Python version: [email protected] | ||
Added colorama>=0.4.6 as regular dependency | ||
Added tqdm>=4.66.1 as regular dependency | ||
Added colorama>=0.4.6 as regular dependency | ||
Reusing already existing virtualenv | ||
Generating production lockfile: [TEMP_PATH]/project/requirements.lock | ||
Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock | ||
|
@@ -94,8 +138,8 @@ fn test_add_flask_wrong_venv_exported() { | |
----- stdout ----- | ||
Initializing new virtualenv in [TEMP_PATH]/project/.venv | ||
Python version: [email protected] | ||
Added colorama>=0.4.6 as regular dependency | ||
Added flask>=3.0.0 as regular dependency | ||
Added colorama>=0.4.6 as regular dependency | ||
Reusing already existing virtualenv | ||
Generating production lockfile: [TEMP_PATH]/project/requirements.lock | ||
Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock | ||
|
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 |
---|---|---|
|
@@ -52,8 +52,8 @@ fn test_add_and_sync_no_auto_sync() { | |
----- stdout ----- | ||
Initializing new virtualenv in [TEMP_PATH]/project/.venv | ||
Python version: [email protected] | ||
Added colorama>=0.4.6 as regular dependency | ||
Added flask>=3.0.0 as regular dependency | ||
Added colorama>=0.4.6 as regular dependency | ||
----- stderr ----- | ||
"###); | ||
|
@@ -95,8 +95,8 @@ fn test_add_autosync() { | |
----- stdout ----- | ||
Initializing new virtualenv in [TEMP_PATH]/project/.venv | ||
Python version: [email protected] | ||
Added colorama>=0.4.6 as regular dependency | ||
Added flask>=3.0.0 as regular dependency | ||
Added colorama>=0.4.6 as regular dependency | ||
Reusing already existing virtualenv | ||
Generating production lockfile: [TEMP_PATH]/project/requirements.lock | ||
Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock | ||
|