Skip to content

Commit

Permalink
chore(deps): update rust crate insta to v1.38.0 (#10701)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored Apr 1, 2024
1 parent 20d69ea commit 4047d45
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
14 changes: 2 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions crates/ruff/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,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};

Expand All @@ -80,7 +80,7 @@ mod tests {
version: "0.0.0".to_string(),
commit_info: None,
};
assert_display_snapshot!(version);
assert_snapshot!(version);
}

#[test]
Expand All @@ -95,7 +95,7 @@ mod tests {
commits_since_last_tag: 0,
}),
};
assert_display_snapshot!(version);
assert_snapshot!(version);
}

#[test]
Expand All @@ -110,7 +110,7 @@ mod tests {
commits_since_last_tag: 24,
}),
};
assert_display_snapshot!(version);
assert_snapshot!(version);
}

#[test]
Expand Down
4 changes: 1 addition & 3 deletions crates/ruff_python_resolver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ mod tests {
($value: ident) => {{
// The debug representation for the backslash are two backslashes (escaping)
let $value = std::format!("{:#?}", $value).replace("\\\\", "/");
// `insta::assert_snapshot` uses the debug representation of the string, which would
// be a single line containing `\n`
insta::assert_display_snapshot!($value);
insta::assert_snapshot!($value);
}};
}

Expand Down

0 comments on commit 4047d45

Please sign in to comment.