Filter prefixes from scenario snapshots to improve readability (#779)

I'm a _little_ unsure since this could be confusing but the prefixes can
be pretty long and this is much easier to read.
This commit is contained in:
Zanie Blue
2024-01-04 09:57:41 -06:00
committed by GitHub
parent 2db9135c51
commit e75fde7bfe
2 changed files with 82 additions and 40 deletions

View File

@@ -32,8 +32,12 @@ fn {{normalized_name}}() -> Result<()> {
let cache_dir = assert_fs::TempDir::new()?;
let venv = create_venv_py312(&temp_dir, &cache_dir);
// In addition to the standard filters, remove the scenario prefix
let mut filters = INSTA_FILTERS.to_vec();
filters.push((r"{{prefix}}-", ""));
insta::with_settings!({
filters => INSTA_FILTERS.to_vec()
filters => filters
}, {
assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME))
.arg("pip-install")