Skip to content

Commit cbf2232

Browse files
committed
update tests
1 parent 392f86b commit cbf2232

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

crates/pixi-build/src/bin/pixi-build-cmake/cmake.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ mod tests {
359359
use std::{collections::BTreeMap, path::PathBuf};
360360

361361
use pixi_build_type_conversions::to_project_model_v1;
362-
use pixi_manifest::Manifest;
362+
use pixi_manifest::Manifests;
363363
use rattler_build::console_utils::LoggingOutputHandler;
364364
use rattler_conda_types::{ChannelConfig, Platform};
365365
use tempfile::tempdir;
@@ -400,12 +400,12 @@ mod tests {
400400
// write the raw string into the file
401401
std::fs::write(&tmp_manifest, package_with_host_and_build_deps).unwrap();
402402

403-
let manifest = Manifest::from_str(&tmp_manifest, package_with_host_and_build_deps).unwrap();
404-
let package = manifest.package.unwrap();
403+
let manifest = Manifests::from_workspace_manifest_path(tmp_manifest).unwrap();
404+
let package = manifest.value.package.unwrap();
405405
let channel_config = ChannelConfig::default_with_root_dir(tmp_dir.path().to_path_buf());
406-
let project_model = to_project_model_v1(&package, &channel_config).unwrap();
406+
let project_model = to_project_model_v1(&package.value, &channel_config).unwrap();
407407
let cmake_backend = CMakeBuildBackend::new(
408-
&manifest.path,
408+
&package.provenance.path,
409409
project_model,
410410
CMakeBackendConfig::default(),
411411
LoggingOutputHandler::default(),
@@ -457,6 +457,6 @@ mod tests {
457457
// write the raw string into the file
458458
std::fs::write(&tmp_manifest, package_with_git_and_subdir).unwrap();
459459

460-
Manifest::from_str(&tmp_manifest, package_with_git_and_subdir).unwrap();
460+
Manifests::from_workspace_manifest_path(tmp_manifest).unwrap();
461461
}
462462
}

crates/pixi-build/src/bin/pixi-build-python/python.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ mod tests {
404404
use std::{collections::BTreeMap, path::PathBuf};
405405

406406
use pixi_build_type_conversions::to_project_model_v1;
407-
use pixi_manifest::Manifest;
407+
use pixi_manifest::Manifests;
408408
use rattler_build::{console_utils::LoggingOutputHandler, recipe::Recipe};
409409
use rattler_conda_types::{ChannelConfig, Platform};
410410
use tempfile::tempdir;
@@ -415,10 +415,10 @@ mod tests {
415415
let tmp_dir = tempdir().unwrap();
416416
let tmp_manifest = tmp_dir.path().join("pixi.toml");
417417
std::fs::write(&tmp_manifest, manifest_source).unwrap();
418-
let manifest = pixi_manifest::Manifest::from_path(&tmp_manifest).unwrap();
419-
let package = manifest.package.unwrap();
418+
let manifest = Manifests::from_workspace_manifest_path(tmp_manifest.clone()).unwrap();
419+
let package = manifest.value.package.unwrap();
420420
let channel_config = ChannelConfig::default_with_root_dir(tmp_dir.path().to_path_buf());
421-
let project_model = to_project_model_v1(&package, &channel_config).unwrap();
421+
let project_model = to_project_model_v1(&package.value, &channel_config).unwrap();
422422

423423
let python_backend = PythonBuildBackend::new(
424424
tmp_manifest,
@@ -513,12 +513,12 @@ mod tests {
513513
// write the raw string into the file
514514
std::fs::write(&tmp_manifest, package_with_host_and_build_deps).unwrap();
515515

516-
let manifest = Manifest::from_str(&tmp_manifest, package_with_host_and_build_deps).unwrap();
516+
let manifest = Manifests::from_workspace_manifest_path(tmp_manifest.clone()).unwrap();
517+
let package = manifest.value.package.unwrap();
517518
let channel_config = ChannelConfig::default_with_root_dir(tmp_dir.path().to_path_buf());
518-
let project_model =
519-
to_project_model_v1(&manifest.package.unwrap(), &channel_config).unwrap();
519+
let project_model = to_project_model_v1(&package.value, &channel_config).unwrap();
520520
let python_backend = PythonBuildBackend::new(
521-
manifest.path,
521+
package.provenance.path,
522522
project_model,
523523
PythonBackendConfig::default(),
524524
LoggingOutputHandler::default(),

crates/pixi-build/src/manifest_ext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@ mod tests {
100100
ManifestProvenance::new(manifest_path.to_path_buf(), ManifestKind::Pixi),
101101
);
102102

103-
Manifests::from_workspace_source(provenance);
103+
Manifests::from_workspace_source(provenance).unwrap();
104104
}
105105
}

0 commit comments

Comments
 (0)