@@ -254,20 +254,20 @@ def test_build_with_cextension(dist: Path) -> None:
254
254
255
255
zip_names = get_wheel_names (dist / wheel_name )
256
256
assert "my_package/__init__.py" in zip_names
257
- assert (
258
- "my_package/hellomodule.c" not in zip_names
259
- ), "Not collect c files while building wheel"
257
+ assert "my_package/hellomodule.c" not in zip_names , (
258
+ "Not collect c files while building wheel"
259
+ )
260
260
extension_suffix = ".pyd" if sys .platform == "win32" else ".so"
261
261
assert any (name .endswith (extension_suffix ) for name in zip_names )
262
262
263
263
tar_names = get_tarball_names (dist / sdist_name )
264
264
assert "demo_package-0.1.0/my_package/__init__.py" in tar_names
265
- assert (
266
- "demo_package-0.1.0/my_package/hellomodule.c" in tar_names
267
- ), "Collect c files while building sdist"
268
- assert not any (
269
- path . startswith ( "build" ) for path in tar_names
270
- ), 'Not collect c files in temporary directory "./build"'
265
+ assert "demo_package-0.1.0/my_package/hellomodule.c" in tar_names , (
266
+ "Collect c files while building sdist"
267
+ )
268
+ assert not any (path . startswith ( "build" ) for path in tar_names ), (
269
+ 'Not collect c files in temporary directory "./build"'
270
+ )
271
271
272
272
273
273
@pytest .mark .parametrize ("name" , ["demo-cextension-in-src" ])
@@ -277,20 +277,20 @@ def test_build_with_cextension_in_src(dist: Path) -> None:
277
277
278
278
zip_names = get_wheel_names (dist / wheel_name )
279
279
assert "my_package/__init__.py" in zip_names
280
- assert (
281
- "my_package/hellomodule.c" not in zip_names
282
- ), "Not collect c files while building wheel"
280
+ assert "my_package/hellomodule.c" not in zip_names , (
281
+ "Not collect c files while building wheel"
282
+ )
283
283
extension_suffix = ".pyd" if sys .platform == "win32" else ".so"
284
284
assert any (name .endswith (extension_suffix ) for name in zip_names )
285
285
286
286
tar_names = get_tarball_names (dist / sdist_name )
287
287
assert "demo_package-0.1.0/src/my_package/__init__.py" in tar_names
288
- assert (
289
- "demo_package-0.1.0/src/my_package/hellomodule.c" in tar_names
290
- ), "Collect c files while building sdist"
291
- assert not any (
292
- path . startswith ( "build" ) for path in tar_names
293
- ), 'Not collect c files in temporary directory "./build"'
288
+ assert "demo_package-0.1.0/src/my_package/hellomodule.c" in tar_names , (
289
+ "Collect c files while building sdist"
290
+ )
291
+ assert not any (path . startswith ( "build" ) for path in tar_names ), (
292
+ 'Not collect c files in temporary directory "./build"'
293
+ )
294
294
295
295
296
296
@pytest .mark .parametrize ("name" , ["demo-package" ])
@@ -329,9 +329,9 @@ def test_build_editable_src(dist: Path, fixture_project: Path) -> None:
329
329
namelist = zf .namelist ()
330
330
assert "demo_package.pth" in namelist
331
331
assert "_editable_impl_demo_package.py" in namelist
332
- assert (
333
- "my_package/ data.json" not in namelist
334
- ), "data files in proxy modules are excluded"
332
+ assert "my_package/data.json" not in namelist , (
333
+ "data files in proxy modules are excluded"
334
+ )
335
335
assert "data_out.json" in namelist
336
336
337
337
pth_content = zf .read ("demo_package.pth" ).decode ("utf-8" ).strip ()
0 commit comments