Skip to content

Commit

Permalink
fix: the satifiability of the rich example and test it (#2665)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim de Jager <[email protected]>
  • Loading branch information
ruben-arts and tdejager authored Dec 9, 2024
1 parent 798763b commit da38075
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/rich_example/pixi.lock

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

11 changes: 9 additions & 2 deletions src/lock_file/satisfiability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1486,8 +1486,15 @@ mod tests {

#[rstest]
#[tokio::test]
#[cfg_attr(not(feature = "slow_integration_tests"), ignore)]
async fn test_example_satisfiability(#[files("examples/*/pixi.toml")] manifest_path: PathBuf) {
async fn test_example_satisfiability(#[files("examples/*/p*.toml")] manifest_path: PathBuf) {
// If a pyproject.toml is present check for `tool.pixi` in the file to avoid testing of non-pixi files
if manifest_path.file_name().unwrap() == "pyproject.toml" {
let manifest_str = fs_err::read_to_string(&manifest_path).unwrap();
if !manifest_str.contains("tool.pixi") {
return;
}
}

let project = Project::from_path(&manifest_path).unwrap();
let lock_file = LockFile::from_path(&project.lock_file_path()).unwrap();
match verify_lockfile_satisfiability(&project, &lock_file)
Expand Down

0 comments on commit da38075

Please sign in to comment.