Bump insta from 1.35.1 to 1.36.1 (#2180)

This commit is contained in:
dependabot[bot] 2024-03-04 23:01:49 +00:00 committed by GitHub
parent bc43f609b9
commit e66afa8767
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 42 additions and 44 deletions

4
Cargo.lock generated
View file

@ -1532,9 +1532,9 @@ checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8"
[[package]]
name = "insta"
version = "1.35.1"
version = "1.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c985c1bef99cf13c58fade470483d81a2bfe846ebde60ed28cc2dddec2df9e2"
checksum = "0a7c22c4d34ef4788c351e971c52bfdfe7ea2766f8c5466bc175dd46e52ac22e"
dependencies = [
"console",
"lazy_static",

View file

@ -26,4 +26,4 @@ thiserror = { workspace = true }
url = { workspace = true }
[dev-dependencies]
insta = { version = "1.35.1" }
insta = { version = "1.36.1" }

View file

@ -234,56 +234,56 @@ mod tests {
#[test]
fn err_not_whl_extension() {
let err = WheelFilename::from_str("foo.rs").unwrap_err();
insta::assert_display_snapshot!(err, @r###"The wheel filename "foo.rs" is invalid: Must end with .whl"###);
insta::assert_snapshot!(err, @r###"The wheel filename "foo.rs" is invalid: Must end with .whl"###);
}
#[test]
fn err_1_part_empty() {
let err = WheelFilename::from_str(".whl").unwrap_err();
insta::assert_display_snapshot!(err, @r###"The wheel filename ".whl" is invalid: Must have a version"###);
insta::assert_snapshot!(err, @r###"The wheel filename ".whl" is invalid: Must have a version"###);
}
#[test]
fn err_1_part_no_version() {
let err = WheelFilename::from_str("foo.whl").unwrap_err();
insta::assert_display_snapshot!(err, @r###"The wheel filename "foo.whl" is invalid: Must have a version"###);
insta::assert_snapshot!(err, @r###"The wheel filename "foo.whl" is invalid: Must have a version"###);
}
#[test]
fn err_2_part_no_pythontag() {
let err = WheelFilename::from_str("foo-version.whl").unwrap_err();
insta::assert_display_snapshot!(err, @r###"The wheel filename "foo-version.whl" is invalid: Must have a Python tag"###);
insta::assert_snapshot!(err, @r###"The wheel filename "foo-version.whl" is invalid: Must have a Python tag"###);
}
#[test]
fn err_3_part_no_abitag() {
let err = WheelFilename::from_str("foo-version-python.whl").unwrap_err();
insta::assert_display_snapshot!(err, @r###"The wheel filename "foo-version-python.whl" is invalid: Must have an ABI tag"###);
insta::assert_snapshot!(err, @r###"The wheel filename "foo-version-python.whl" is invalid: Must have an ABI tag"###);
}
#[test]
fn err_4_part_no_platformtag() {
let err = WheelFilename::from_str("foo-version-python-abi.whl").unwrap_err();
insta::assert_display_snapshot!(err, @r###"The wheel filename "foo-version-python-abi.whl" is invalid: Must have a platform tag"###);
insta::assert_snapshot!(err, @r###"The wheel filename "foo-version-python-abi.whl" is invalid: Must have a platform tag"###);
}
#[test]
fn err_too_many_parts() {
let err =
WheelFilename::from_str("foo-1.2.3-build-python-abi-platform-oops.whl").unwrap_err();
insta::assert_display_snapshot!(err, @r###"The wheel filename "foo-1.2.3-build-python-abi-platform-oops.whl" is invalid: Must have 5 or 6 components, but has more"###);
insta::assert_snapshot!(err, @r###"The wheel filename "foo-1.2.3-build-python-abi-platform-oops.whl" is invalid: Must have 5 or 6 components, but has more"###);
}
#[test]
fn err_invalid_package_name() {
let err = WheelFilename::from_str("f!oo-1.2.3-python-abi-platform.whl").unwrap_err();
insta::assert_display_snapshot!(err, @r###"The wheel filename "f!oo-1.2.3-python-abi-platform.whl" has an invalid package name"###);
insta::assert_snapshot!(err, @r###"The wheel filename "f!oo-1.2.3-python-abi-platform.whl" has an invalid package name"###);
}
#[test]
fn err_invalid_version() {
let err = WheelFilename::from_str("foo-x.y.z-python-abi-platform.whl").unwrap_err();
insta::assert_display_snapshot!(err, @r###"The wheel filename "foo-x.y.z-python-abi-platform.whl" has an invalid version part: expected version to start with a number, but no leading ASCII digits were found"###);
insta::assert_snapshot!(err, @r###"The wheel filename "foo-x.y.z-python-abi-platform.whl" has an invalid version part: expected version to start with a number, but no leading ASCII digits were found"###);
}
#[test]

View file

@ -29,7 +29,7 @@ url = { workspace = true }
[dev-dependencies]
indoc = { version = "2.0.4" }
insta = { version = "1.35.1" }
insta = { version = "1.36.1" }
serde_json = { version = "1.0.114" }
tempfile = { version = "3.9.0" }
test-case = { version = "3.3.1" }

View file

@ -32,7 +32,7 @@ url = { workspace = true }
anyhow = { version = "1.0.80" }
assert_fs = { version = "1.1.1" }
indoc = { version = "2.0.4" }
insta = { version = "1.35.1", features = ["filters"] }
insta = { version = "1.36.1", features = ["filters"] }
itertools = { version = "0.12.1" }
serde_json = { version = "1.0.114" }
tempfile = { version = "3.9.0" }

View file

@ -1121,7 +1121,7 @@ mod test {
insta::with_settings!({
filters => filters,
}, {
insta::assert_display_snapshot!(errors, @r###"
insta::assert_snapshot!(errors, @r###"
Error parsing included file in `<REQUIREMENTS_TXT>` at position 0
failed to open file `<MISSING_TXT>`
"###);
@ -1150,7 +1150,7 @@ mod test {
insta::with_settings!({
filters => filters
}, {
insta::assert_display_snapshot!(errors, @r###"
insta::assert_snapshot!(errors, @r###"
Couldn't parse requirement in `<REQUIREMENTS_TXT>` at position 0
Expected an alphanumeric character starting the extra name, found 'ö'
numpy[ö]==1.29
@ -1181,7 +1181,7 @@ mod test {
insta::with_settings!({
filters => filters
}, {
insta::assert_display_snapshot!(errors, @"Unsupported URL (expected a `file://` scheme) in `<REQUIREMENTS_TXT>`: `http://localhost:8080/`");
insta::assert_snapshot!(errors, @"Unsupported URL (expected a `file://` scheme) in `<REQUIREMENTS_TXT>`: `http://localhost:8080/`");
});
Ok(())
@ -1204,7 +1204,7 @@ mod test {
insta::with_settings!({
filters => filters
}, {
insta::assert_display_snapshot!(errors, @r###"
insta::assert_snapshot!(errors, @r###"
Couldn't parse requirement in `<REQUIREMENTS_TXT>` at position 6
Expected either alphanumerical character (starting the extra name) or ']' (ending the extras section), found ','
black[,abcdef]
@ -1235,7 +1235,7 @@ mod test {
insta::with_settings!({
filters => filters
}, {
insta::assert_display_snapshot!(errors, @r###"
insta::assert_snapshot!(errors, @r###"
Invalid URL in `<REQUIREMENTS_TXT>` at position 0: `123`
relative URL without a base
"###);
@ -1269,7 +1269,7 @@ mod test {
insta::with_settings!({
filters => filters
}, {
insta::assert_display_snapshot!(errors, @"Requirement `file.txt` in `<REQUIREMENTS_TXT>` looks like a requirements file but was passed as a package name. Did you mean `-r file.txt`?");
insta::assert_snapshot!(errors, @"Requirement `file.txt` in `<REQUIREMENTS_TXT>` looks like a requirements file but was passed as a package name. Did you mean `-r file.txt`?");
});
Ok(())
@ -1369,7 +1369,7 @@ mod test {
insta::with_settings!({
filters => filters
}, {
insta::assert_display_snapshot!(errors, @r###"
insta::assert_snapshot!(errors, @r###"
Unexpected '-', expected '-c', '-e', '-r' or the start of a requirement at <REQUIREMENTS_TXT>:2:3
"###);
});

View file

@ -41,4 +41,4 @@ tracing = { workspace = true }
rustc-hash = { workspace = true }
[dev-dependencies]
insta = { version = "1.35.1" }
insta = { version = "1.36.1" }

View file

@ -968,7 +968,7 @@ mod test {
"pygraphviz-1.11",
);
assert!(matches!(err, Error::MissingHeader { .. }));
insta::assert_display_snapshot!(err, @r###"
insta::assert_snapshot!(err, @r###"
Failed building wheel through setup.py:
--- stdout:
running bdist_wheel
@ -988,7 +988,7 @@ mod test {
error: command '/usr/bin/gcc' failed with exit code 1
---
"###);
insta::assert_display_snapshot!(
insta::assert_snapshot!(
std::error::Error::source(&err).unwrap(),
@r###"This error likely indicates that you need to install a library that provides "graphviz/cgraph.h" for pygraphviz-1.11"###
);
@ -1018,7 +1018,7 @@ mod test {
"pygraphviz-1.11",
);
assert!(matches!(err, Error::MissingHeader { .. }));
insta::assert_display_snapshot!(err, @r###"
insta::assert_snapshot!(err, @r###"
Failed building wheel through setup.py:
--- stdout:
@ -1030,7 +1030,7 @@ mod test {
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
---
"###);
insta::assert_display_snapshot!(
insta::assert_snapshot!(
std::error::Error::source(&err).unwrap(),
@"This error likely indicates that you need to install the library that provides a shared library for ncurses for pygraphviz-1.11 (e.g. libncurses-dev)"
);

View file

@ -50,5 +50,5 @@ urlencoding = { workspace = true }
[dev-dependencies]
anyhow = { workspace = true }
hyper = { version = "0.14.28", features = ["server", "http1"] }
insta = { version = "1.35.1" }
insta = { version = "1.36.1" }
tokio = { workspace = true, features = ["fs", "macros"] }

View file

@ -569,7 +569,7 @@ mod tests {
";
let base = Url::parse("https://download.pytorch.org/whl/jinja2/").unwrap();
let result = SimpleHtml::parse(text, &base).unwrap_err();
insta::assert_display_snapshot!(result, @"Missing href attribute on anchor link");
insta::assert_snapshot!(result, @"Missing href attribute on anchor link");
}
#[test]
@ -586,7 +586,7 @@ mod tests {
"#;
let base = Url::parse("https://download.pytorch.org/whl/jinja2/").unwrap();
let result = SimpleHtml::parse(text, &base).unwrap_err();
insta::assert_display_snapshot!(result, @"Missing href attribute on anchor link");
insta::assert_snapshot!(result, @"Missing href attribute on anchor link");
}
#[test]
@ -655,7 +655,7 @@ mod tests {
"#;
let base = Url::parse("https://download.pytorch.org/whl/jinja2/").unwrap();
let result = SimpleHtml::parse(text, &base).unwrap_err();
insta::assert_display_snapshot!(result, @"Unexpected fragment (expected `#sha256=...`) on URL: sha256");
insta::assert_snapshot!(result, @"Unexpected fragment (expected `#sha256=...`) on URL: sha256");
}
#[test]
@ -672,7 +672,7 @@ mod tests {
"#;
let base = Url::parse("https://download.pytorch.org/whl/jinja2/").unwrap();
let result = SimpleHtml::parse(text, &base).unwrap_err();
insta::assert_display_snapshot!(result, @"Unsupported hash algorithm (expected `sha256`) on: sha512=6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61");
insta::assert_snapshot!(result, @"Unsupported hash algorithm (expected `sha256`) on: sha512=6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61");
}
#[test]

View file

@ -39,6 +39,6 @@ which = { workspace = true}
[dev-dependencies]
anyhow = { version = "1.0.80" }
indoc = { version = "2.0.4" }
insta = { version = "1.35.1" }
insta = { version = "1.36.1" }
itertools = { version = "0.12.1" }
tempfile = { version = "3.9.0" }

View file

@ -430,7 +430,7 @@ mod windows {
mod tests {
use std::fmt::Debug;
use insta::assert_display_snapshot;
use insta::assert_snapshot;
use itertools::Itertools;
use platform_host::Platform;
@ -457,7 +457,7 @@ mod windows {
(r"Caused by: .* \(os error 3\)", "Caused by: The system cannot find the path specified. (os error 3)")
]
}, {
assert_display_snapshot!(
assert_snapshot!(
format_err(result), @r###"
failed to canonicalize path `C:\does\not\exists\python3.12`
Caused by: The system cannot find the path specified. (os error 3)
@ -470,8 +470,6 @@ mod windows {
#[cfg(unix)]
#[cfg(test)]
mod tests {
use insta::assert_display_snapshot;
#[cfg(unix)]
use insta::assert_snapshot;
use itertools::Itertools;
@ -513,7 +511,7 @@ mod tests {
)
.unwrap()
.ok_or(Error::NoSuchPython(request.to_string()));
assert_display_snapshot!(
assert_snapshot!(
format_err(result),
@"No Python python3.1000 In `PATH`. Is Python python3.1000 installed?"
);
@ -526,7 +524,7 @@ mod tests {
&Platform::current().unwrap(),
&Cache::temp().unwrap(),
);
assert_display_snapshot!(
assert_snapshot!(
format_err(result), @r###"
failed to canonicalize path `/does/not/exists/python3.12`
Caused by: No such file or directory (os error 2)

View file

@ -66,7 +66,7 @@ uv-virtualenv = { path = "../uv-virtualenv" }
uv-interpreter = { path = "../uv-interpreter" }
once_cell = { version = "1.19.0" }
insta = { version = "1.35.1" }
insta = { version = "1.36.1" }
[features]
default = ["pypi"]

View file

@ -84,7 +84,7 @@ assert_cmd = { version = "2.0.14" }
assert_fs = { version = "1.1.0" }
filetime = { version = "0.2.23" }
indoc = { version = "2.0.4" }
insta = { version = "1.35.1", features = ["filters", "json"] }
insta = { version = "1.36.1", features = ["filters", "json"] }
predicates = { version = "3.0.4" }
regex = { version = "1.10.3" }
reqwest = { version = "0.11.23", features = ["blocking"], default-features = false }

View file

@ -76,7 +76,7 @@ pub(crate) fn version() -> VersionInfo {
#[cfg(test)]
mod tests {
use insta::{assert_display_snapshot, assert_json_snapshot};
use insta::{assert_json_snapshot, assert_snapshot};
use super::{CommitInfo, VersionInfo};
@ -86,7 +86,7 @@ mod tests {
version: "0.0.0".to_string(),
commit_info: None,
};
assert_display_snapshot!(version, @"0.0.0");
assert_snapshot!(version, @"0.0.0");
}
#[test]
@ -101,7 +101,7 @@ mod tests {
commits_since_last_tag: 0,
}),
};
assert_display_snapshot!(version, @"0.0.0 (53b0f5d92 2023-10-19)");
assert_snapshot!(version, @"0.0.0 (53b0f5d92 2023-10-19)");
}
#[test]
@ -116,7 +116,7 @@ mod tests {
commits_since_last_tag: 24,
}),
};
assert_display_snapshot!(version, @"0.0.0+24 (53b0f5d92 2023-10-19)");
assert_snapshot!(version, @"0.0.0+24 (53b0f5d92 2023-10-19)");
}
#[test]