Skip to content

Commit

Permalink
clippy: Fix unnecessary hashes around raw string literal in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vigilans committed Jul 30, 2024
1 parent 5edae5d commit d7e9059
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions crates/uv/tests/venv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {

// Without the file, we should use the first on the PATH
uv_snapshot!(context.filters(), context.venv()
.arg("--preview"), @r###"
.arg("--preview"), @r#"
success: true
exit_code: 0
----- stdout -----
Expand All @@ -187,22 +187,22 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
"###
"#
);

// With `requires-python = "<3.11"`, we should prefer newest possible version 3.10
let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str(indoc! { r###"
pyproject_toml.write_str(indoc! { r#"
[project]
name = "foo"
version = "1.0.0"
requires-python = "<3.11"
dependencies = []
"###
"#
})?;

uv_snapshot!(context.filters(), context.venv()
.arg("--preview"), @r###"
.arg("--preview"), @r#"
success: true
exit_code: 0
----- stdout -----
Expand All @@ -211,22 +211,22 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
Using Python 3.10.[X] interpreter at: [PYTHON-3.10]
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
"###
"#
);

// With `requires-python = "==3.11.*"`, we should prefer exact version 3.11
let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str(indoc! { r###"
pyproject_toml.write_str(indoc! { r#"
[project]
name = "foo"
version = "1.0.0"
requires-python = "==3.11.*"
dependencies = []
"###
"#
})?;

uv_snapshot!(context.filters(), context.venv()
.arg("--preview"), @r###"
.arg("--preview"), @r#"
success: true
exit_code: 0
----- stdout -----
Expand All @@ -235,22 +235,22 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
"###
"#
);

// With `requires-python = ">=3.11,<3.12"`, we should prefer exact version 3.11
let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str(indoc! { r###"
pyproject_toml.write_str(indoc! { r#"
[project]
name = "foo"
version = "1.0.0"
requires-python = "==3.11.*"
dependencies = []
"###
"#
})?;

uv_snapshot!(context.filters(), context.venv()
.arg("--preview"), @r###"
.arg("--preview"), @r#"
success: true
exit_code: 0
----- stdout -----
Expand All @@ -259,22 +259,22 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
"###
"#
);

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

uv_snapshot!(context.filters(), context.venv()
.arg("--preview"), @r###"
.arg("--preview"), @r#"
success: true
exit_code: 0
----- stdout -----
Expand All @@ -283,22 +283,22 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
"###
"#
);

// 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###"
pyproject_toml.write_str(indoc! { r#"
[project]
name = "foo"
version = "1.0.0"
requires-python = ">=3.10"
dependencies = []
"###
"#
})?;

uv_snapshot!(context.filters(), context.venv()
.arg("--preview"), @r###"
.arg("--preview"), @r#"
success: true
exit_code: 0
----- stdout -----
Expand All @@ -307,22 +307,22 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
"###
"#
);

// With `requires-python = ">=3.12"`, we should prefer first possible version 3.12
let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str(indoc! { r###"
pyproject_toml.write_str(indoc! { r#"
[project]
name = "foo"
version = "1.0.0"
requires-python = ">=3.10"
dependencies = []
"###
"#
})?;

uv_snapshot!(context.filters(), context.venv()
.arg("--preview"), @r###"
.arg("--preview"), @r#"
success: true
exit_code: 0
----- stdout -----
Expand All @@ -331,7 +331,7 @@ fn create_venv_reads_request_from_pyproject_toml() -> Result<()> {
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
"###
"#
);

context.venv.assert(predicates::path::is_dir());
Expand Down

0 comments on commit d7e9059

Please sign in to comment.