@@ -19,7 +19,11 @@ def test_package_builds_successfully(
19
19
) -> None :
20
20
"""Test that package builds without errors."""
21
21
result = subprocess .run (
22
- ["uv" , "build" ], cwd = generated_template_path , capture_output = True , text = True
22
+ ["uv" , "build" ],
23
+ cwd = generated_template_path ,
24
+ capture_output = True ,
25
+ text = True ,
26
+ check = False ,
23
27
)
24
28
assert result .returncode == 0 , f"Package build failed: { result .stderr } "
25
29
@@ -38,7 +42,11 @@ def test_wheel_package_structure(
38
42
"""Test that built wheel has correct structure."""
39
43
# Build the package
40
44
result = subprocess .run (
41
- ["uv" , "build" ], cwd = generated_template_path , capture_output = True , text = True
45
+ ["uv" , "build" ],
46
+ cwd = generated_template_path ,
47
+ capture_output = True ,
48
+ text = True ,
49
+ check = False ,
42
50
)
43
51
assert result .returncode == 0 , f"Build failed: { result .stderr } "
44
52
@@ -85,7 +93,11 @@ def test_source_distribution_structure(
85
93
"""Test that built source distribution has correct structure."""
86
94
# Build the package
87
95
result = subprocess .run (
88
- ["uv" , "build" ], cwd = generated_template_path , capture_output = True , text = True
96
+ ["uv" , "build" ],
97
+ cwd = generated_template_path ,
98
+ capture_output = True ,
99
+ text = True ,
100
+ check = False ,
89
101
)
90
102
assert result .returncode == 0 , f"Build failed: { result .stderr } "
91
103
@@ -123,7 +135,11 @@ def test_package_metadata_validity(
123
135
"""Test that package metadata is valid."""
124
136
# Build the package
125
137
result = subprocess .run (
126
- ["uv" , "build" ], cwd = generated_template_path , capture_output = True , text = True
138
+ ["uv" , "build" ],
139
+ cwd = generated_template_path ,
140
+ capture_output = True ,
141
+ text = True ,
142
+ check = False ,
127
143
)
128
144
assert result .returncode == 0 , f"Build failed: { result .stderr } "
129
145
@@ -158,15 +174,22 @@ def test_package_installation_from_wheel(
158
174
"""Test that built wheel can be installed and used."""
159
175
# Build the package
160
176
result = subprocess .run (
161
- ["uv" , "build" ], cwd = generated_template_path , capture_output = True , text = True
177
+ ["uv" , "build" ],
178
+ cwd = generated_template_path ,
179
+ capture_output = True ,
180
+ text = True ,
181
+ check = False ,
162
182
)
163
183
assert result .returncode == 0 , f"Build failed: { result .stderr } "
164
184
165
185
# Create a test environment
166
186
test_env = tmp_path_factory .mktemp ("install_test" )
167
187
168
188
result = subprocess .run (
169
- ["uv" , "venv" , str (test_env / "venv" )], capture_output = True , text = True
189
+ ["uv" , "venv" , str (test_env / "venv" )],
190
+ capture_output = True ,
191
+ text = True ,
192
+ check = False ,
170
193
)
171
194
assert result .returncode == 0 , (
172
195
f"Virtual environment creation failed: { result .stderr } "
@@ -184,6 +207,7 @@ def test_package_installation_from_wheel(
184
207
env = env ,
185
208
capture_output = True ,
186
209
text = True ,
210
+ check = False ,
187
211
)
188
212
assert result .returncode == 0 , f"Wheel installation failed: { result .stderr } "
189
213
@@ -197,6 +221,7 @@ def test_package_installation_from_wheel(
197
221
[str (venv_python ), "-c" , "import thing; print('Import successful')" ],
198
222
capture_output = True ,
199
223
text = True ,
224
+ check = False ,
200
225
)
201
226
assert result .returncode == 0 , (
202
227
f"Installed package import failed: { result .stderr } "
@@ -210,7 +235,11 @@ def test_build_reproducibility(
210
235
"""Test that builds are reproducible."""
211
236
# Build once
212
237
result1 = subprocess .run (
213
- ["uv" , "build" ], cwd = generated_template_path , capture_output = True , text = True
238
+ ["uv" , "build" ],
239
+ cwd = generated_template_path ,
240
+ capture_output = True ,
241
+ text = True ,
242
+ check = False ,
214
243
)
215
244
assert result1 .returncode == 0 , f"First build failed: { result1 .stderr } "
216
245
@@ -222,7 +251,11 @@ def test_build_reproducibility(
222
251
subprocess .run (["rm" , "-rf" , str (dist_dir )], check = True )
223
252
224
253
result2 = subprocess .run (
225
- ["uv" , "build" ], cwd = generated_template_path , capture_output = True , text = True
254
+ ["uv" , "build" ],
255
+ cwd = generated_template_path ,
256
+ capture_output = True ,
257
+ text = True ,
258
+ check = False ,
226
259
)
227
260
assert result2 .returncode == 0 , f"Second build failed: { result2 .stderr } "
228
261
@@ -265,7 +298,11 @@ def test_build_with_different_backends(
265
298
266
299
# Test build
267
300
result = subprocess .run (
268
- ["uv" , "build" ], cwd = project_path , capture_output = True , text = True
301
+ ["uv" , "build" ],
302
+ cwd = project_path ,
303
+ capture_output = True ,
304
+ text = True ,
305
+ check = False ,
269
306
)
270
307
assert result .returncode == 0 , (
271
308
f"Build with { backend } backend failed: { result .stderr } "
@@ -286,7 +323,11 @@ def test_package_size_reasonable(
286
323
"""Test that built packages are reasonably sized."""
287
324
# Build the package
288
325
result = subprocess .run (
289
- ["uv" , "build" ], cwd = generated_template_path , capture_output = True , text = True
326
+ ["uv" , "build" ],
327
+ cwd = generated_template_path ,
328
+ capture_output = True ,
329
+ text = True ,
330
+ check = False ,
290
331
)
291
332
assert result .returncode == 0 , f"Build failed: { result .stderr } "
292
333
@@ -330,7 +371,11 @@ def test_clean_build_environment(
330
371
331
372
# Build in clean state
332
373
result = subprocess .run (
333
- ["uv" , "build" ], cwd = generated_template_path , capture_output = True , text = True
374
+ ["uv" , "build" ],
375
+ cwd = generated_template_path ,
376
+ capture_output = True ,
377
+ text = True ,
378
+ check = False ,
334
379
)
335
380
assert result .returncode == 0 , f"Clean build failed: { result .stderr } "
336
381
@@ -357,7 +402,11 @@ def test_version_consistency(
357
402
358
403
# Build and check wheel metadata version
359
404
result = subprocess .run (
360
- ["uv" , "build" ], cwd = generated_template_path , capture_output = True , text = True
405
+ ["uv" , "build" ],
406
+ cwd = generated_template_path ,
407
+ capture_output = True ,
408
+ text = True ,
409
+ check = False ,
361
410
)
362
411
assert result .returncode == 0 , f"Build failed: { result .stderr } "
363
412
0 commit comments