99
1010import pytest
1111
12- from appose . builder import DynamicBuilder
12+ import appose
1313from appose .builder .pixi import PixiBuilder
1414
1515from tests .test_base import cowsay_and_assert
2222def test_conda ():
2323 """Tests the builder-agnostic API with an environment.yml file."""
2424 env = (
25- DynamicBuilder ()
25+ appose
2626 .file (str (TEST_RESOURCES / "cowsay.yml" ))
2727 .base ("target/envs/conda-cowsay" )
2828 .log_debug ()
@@ -35,7 +35,8 @@ def test_conda():
3535def test_pixi ():
3636 """Tests building from a pixi.toml file."""
3737 env = (
38- PixiBuilder ()
38+ appose
39+ .pixi ()
3940 .file (str (TEST_RESOURCES / "cowsay-pixi.toml" ))
4041 .base ("target/envs/pixi-cowsay" )
4142 .log_debug ()
@@ -48,7 +49,8 @@ def test_pixi():
4849def test_pixi_builder_api ():
4950 """Tests the programmatic builder API for pixi."""
5051 env = (
51- PixiBuilder ()
52+ appose
53+ .pixi ()
5254 .conda ("python>=3.8" , "appose" )
5355 .pypi ("cowsay==6.1" )
5456 .base ("target/envs/pixi-cowsay-builder" )
@@ -66,7 +68,7 @@ def test_pixi_vacuous():
6668 shutil .rmtree (base )
6769
6870 with pytest .raises (Exception ): # Should raise IllegalStateException equivalent
69- PixiBuilder ().base (base ).log_debug ().build ()
71+ appose . pixi ().base (base ).log_debug ().build ()
7072
7173
7274def test_pixi_appose_requirement ():
@@ -77,7 +79,8 @@ def test_pixi_appose_requirement():
7779
7880 with pytest .raises (Exception ): # Should raise IllegalStateException equivalent
7981 (
80- PixiBuilder ()
82+ appose
83+ .pixi ()
8184 .conda ("python" )
8285 .pypi ("cowsay==6.1" )
8386 .base (base )
@@ -89,7 +92,8 @@ def test_pixi_appose_requirement():
8992def test_pixi_pyproject ():
9093 """Tests building from a pyproject.toml with pixi config."""
9194 env = (
92- PixiBuilder ()
95+ appose
96+ .pixi ()
9397 .file (str (TEST_RESOURCES / "cowsay-pixi-pyproject.toml" ))
9498 .base ("target/envs/pixi-cowsay-pyproject" )
9599 .log_debug ()
@@ -115,7 +119,8 @@ def test_content_api():
115119"""
116120
117121 env = (
118- PixiBuilder ()
122+ appose
123+ .pixi ()
119124 .content (pixi_toml )
120125 .base ("target/envs/pixi-content-test" )
121126 .log_debug ()
@@ -139,7 +144,7 @@ def test_content_environment_yml():
139144"""
140145
141146 env = (
142- DynamicBuilder ()
147+ appose
143148 .content (env_yml )
144149 .base ("target/envs/content-env-yml" )
145150 .log_debug ()
@@ -157,7 +162,8 @@ def test_build_installs_env():
157162 not only after the first pixi run invocation.
158163 """
159164 env = (
160- PixiBuilder ()
165+ appose
166+ .pixi ()
161167 .file (str (TEST_RESOURCES / "cowsay-pixi.toml" ))
162168 .base ("target/envs/pixi-build-installs-env" )
163169 .log_debug ()
@@ -175,7 +181,8 @@ def test_build_installs_env():
175181def test_pixi_environment_selection ():
176182 """Tests that .environment() selects a non-default pixi environment."""
177183 env = (
178- PixiBuilder ()
184+ appose
185+ .pixi ()
179186 .file (str (TEST_RESOURCES / "cowsay-multi-env.toml" ))
180187 .base ("target/envs/pixi-multi-env" )
181188 .environment ("alt" )
@@ -213,7 +220,7 @@ def test_content_pixi_toml():
213220"""
214221
215222 env = (
216- DynamicBuilder ()
223+ appose
217224 .content (pixi_toml )
218225 .base ("target/envs/content-pixi-toml" )
219226 .log_debug ()
0 commit comments