Skip to content

Commit 86c84b8

Browse files
committed
Code linter always knows best
1 parent 018a2be commit 86c84b8

4 files changed

Lines changed: 14 additions & 34 deletions

File tree

tests/builder/test_mamba.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
def test_explicit_mamba_builder():
2121
"""Tests explicit mamba builder selection using .builder() method."""
2222
env = (
23-
appose
24-
.file(str(TEST_RESOURCES / "cowsay.yml"))
23+
appose.file(str(TEST_RESOURCES / "cowsay.yml"))
2524
.builder("mamba")
2625
.base("target/envs/mamba-cowsay")
2726
.log_debug()

tests/builder/test_pixi.py

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
def test_conda():
2323
"""Tests the builder-agnostic API with an environment.yml file."""
2424
env = (
25-
appose
26-
.file(str(TEST_RESOURCES / "cowsay.yml"))
25+
appose.file(str(TEST_RESOURCES / "cowsay.yml"))
2726
.base("target/envs/conda-cowsay")
2827
.log_debug()
2928
.build()
@@ -35,8 +34,7 @@ def test_conda():
3534
def test_pixi():
3635
"""Tests building from a pixi.toml file."""
3736
env = (
38-
appose
39-
.pixi()
37+
appose.pixi()
4038
.file(str(TEST_RESOURCES / "cowsay-pixi.toml"))
4139
.base("target/envs/pixi-cowsay")
4240
.log_debug()
@@ -49,8 +47,7 @@ def test_pixi():
4947
def test_pixi_builder_api():
5048
"""Tests the programmatic builder API for pixi."""
5149
env = (
52-
appose
53-
.pixi()
50+
appose.pixi()
5451
.conda("python>=3.8", "appose")
5552
.pypi("cowsay==6.1")
5653
.base("target/envs/pixi-cowsay-builder")
@@ -79,8 +76,7 @@ def test_pixi_appose_requirement():
7976

8077
with pytest.raises(Exception): # Should raise IllegalStateException equivalent
8178
(
82-
appose
83-
.pixi()
79+
appose.pixi()
8480
.conda("python")
8581
.pypi("cowsay==6.1")
8682
.base(base)
@@ -92,8 +88,7 @@ def test_pixi_appose_requirement():
9288
def test_pixi_pyproject():
9389
"""Tests building from a pyproject.toml with pixi config."""
9490
env = (
95-
appose
96-
.pixi()
91+
appose.pixi()
9792
.file(str(TEST_RESOURCES / "cowsay-pixi-pyproject.toml"))
9893
.base("target/envs/pixi-cowsay-pyproject")
9994
.log_debug()
@@ -119,8 +114,7 @@ def test_content_api():
119114
"""
120115

121116
env = (
122-
appose
123-
.pixi()
117+
appose.pixi()
124118
.content(pixi_toml)
125119
.base("target/envs/pixi-content-test")
126120
.log_debug()
@@ -144,11 +138,7 @@ def test_content_environment_yml():
144138
"""
145139

146140
env = (
147-
appose
148-
.content(env_yml)
149-
.base("target/envs/content-env-yml")
150-
.log_debug()
151-
.build()
141+
appose.content(env_yml).base("target/envs/content-env-yml").log_debug().build()
152142
)
153143

154144
assert isinstance(env.builder(), PixiBuilder)
@@ -162,8 +152,7 @@ def test_build_installs_env():
162152
not only after the first pixi run invocation.
163153
"""
164154
env = (
165-
appose
166-
.pixi()
155+
appose.pixi()
167156
.file(str(TEST_RESOURCES / "cowsay-pixi.toml"))
168157
.base("target/envs/pixi-build-installs-env")
169158
.log_debug()
@@ -181,8 +170,7 @@ def test_build_installs_env():
181170
def test_pixi_environment_selection():
182171
"""Tests that .environment() selects a non-default pixi environment."""
183172
env = (
184-
appose
185-
.pixi()
173+
appose.pixi()
186174
.file(str(TEST_RESOURCES / "cowsay-multi-env.toml"))
187175
.base("target/envs/pixi-multi-env")
188176
.environment("alt")
@@ -220,8 +208,7 @@ def test_content_pixi_toml():
220208
"""
221209

222210
env = (
223-
appose
224-
.content(pixi_toml)
211+
appose.content(pixi_toml)
225212
.base("target/envs/content-pixi-toml")
226213
.log_debug()
227214
.build()

tests/builder/test_uv.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
def test_uv():
2121
"""Tests building from a requirements.txt file."""
2222
env = (
23-
appose
24-
.uv()
23+
appose.uv()
2524
.file(str(TEST_RESOURCES / "cowsay-requirements.txt"))
2625
.base("target/envs/uv-cowsay")
2726
.log_debug()
@@ -34,8 +33,7 @@ def test_uv():
3433
def test_uv_builder_api():
3534
"""Tests the programmatic builder API for uv."""
3635
env = (
37-
appose
38-
.uv()
36+
appose.uv()
3937
.include("cowsay==6.1")
4038
.base("target/envs/uv-cowsay-builder")
4139
.log_debug()
@@ -48,8 +46,7 @@ def test_uv_builder_api():
4846
def test_uv_pyproject():
4947
"""Tests building from a pyproject.toml file."""
5048
env = (
51-
appose
52-
.uv()
49+
appose.uv()
5350
.file(str(TEST_RESOURCES / "cowsay-pyproject.toml"))
5451
.base("target/envs/uv-cowsay-pyproject")
5552
.log_debug()

tests/test_python_worker.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# SPDX-License-Identifier: BSD-2-Clause
44

55

6-
from pathlib import Path
7-
8-
96
import appose
107

118
from tests.test_base import source_override

0 commit comments

Comments
 (0)