Skip to content

Commit

Permalink
Add test coverage for non-Python globs (#13430)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored Sep 20, 2024
1 parent 0bbc138 commit 7579a79
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/ruff/tests/analyze_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,14 @@ fn globs() -> Result<()> {

root.child("ruff.toml").write_str(indoc::indoc! {r#"
[analyze]
include-dependencies = { "ruff/a.py" = ["ruff/b.py"], "ruff/b.py" = ["ruff/*.py"] }
include-dependencies = { "ruff/a.py" = ["ruff/b.py"], "ruff/b.py" = ["ruff/*.py"], "ruff/c.py" = ["*.json"] }
"#})?;

root.child("ruff").child("__init__.py").write_str("")?;
root.child("ruff").child("a.py").write_str("")?;
root.child("ruff").child("b.py").write_str("")?;
root.child("ruff").child("c.py").write_str("")?;
root.child("ruff").child("d.json").write_str("")?;

insta::with_settings!({
filters => INSTA_FILTERS.to_vec(),
Expand All @@ -252,7 +253,9 @@ fn globs() -> Result<()> {
"ruff/b.py",
"ruff/c.py"
],
"ruff/c.py": []
"ruff/c.py": [
"ruff/d.json"
]
}
----- stderr -----
Expand Down

0 comments on commit 7579a79

Please sign in to comment.