Skip to content

Commit

Permalink
Fix venv tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vigilans committed Jul 30, 2024
1 parent d7e9059 commit e4baa70
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/uv/tests/venv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
[project]
name = "foo"
version = "1.0.0"
requires-python = "==3.11.*"
requires-python = ">=3.11,<3.12"
dependencies = []
"#
})?;
Expand All @@ -262,13 +262,13 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
"#
);

// With `requires-python = ">=3.10"`, we should prefer first possible version 3.11
// With `requires-python = ">=3.11"`, we should prefer first possible version 3.11
let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str(indoc! { r#"
[project]
name = "foo"
version = "1.0.0"
requires-python = ">=3.10"
requires-python = ">=3.11"
dependencies = []
"#
})?;
Expand All @@ -286,13 +286,13 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
"#
);

// With `requires-python = ">=3.11"`, we should prefer first possible version 3.11
// With `requires-python = ">3.11"`, we should prefer first possible version 3.11
let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str(indoc! { r#"
[project]
name = "foo"
version = "1.0.0"
requires-python = ">=3.10"
requires-python = ">3.11"
dependencies = []
"#
})?;
Expand All @@ -316,7 +316,7 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
[project]
name = "foo"
version = "1.0.0"
requires-python = ">=3.10"
requires-python = ">=3.12"
dependencies = []
"#
})?;
Expand All @@ -328,7 +328,7 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
"#
Expand Down

0 comments on commit e4baa70

Please sign in to comment.