@@ -239,7 +239,7 @@ def test_binary_output(container_engine):
239
239
assert output == binary_data_string
240
240
241
241
242
- def test_file_operation (tmp_path : Path , container_engine ) :
242
+ def test_file_operation (tmp_path : Path , container_engine : OCIContainerEngineConfig ) -> None :
243
243
with OCIContainer (
244
244
engine = container_engine , image = DEFAULT_IMAGE , oci_platform = DEFAULT_OCI_PLATFORM
245
245
) as container :
@@ -259,7 +259,7 @@ def test_file_operation(tmp_path: Path, container_engine):
259
259
assert test_binary_data == bytes (output , encoding = "utf8" , errors = "surrogateescape" )
260
260
261
261
262
- def test_dir_operations (tmp_path : Path , container_engine ) :
262
+ def test_dir_operations (tmp_path : Path , container_engine : OCIContainerEngineConfig ) -> None :
263
263
with OCIContainer (
264
264
engine = container_engine , image = DEFAULT_IMAGE , oci_platform = DEFAULT_OCI_PLATFORM
265
265
) as container :
@@ -301,15 +301,17 @@ def test_dir_operations(tmp_path: Path, container_engine):
301
301
assert test_binary_data == (new_test_dir / "test.dat" ).read_bytes ()
302
302
303
303
304
- def test_environment_executor (container_engine ) :
304
+ def test_environment_executor (container_engine : OCIContainerEngineConfig ) -> None :
305
305
with OCIContainer (
306
306
engine = container_engine , image = DEFAULT_IMAGE , oci_platform = DEFAULT_OCI_PLATFORM
307
307
) as container :
308
308
assignment = EnvironmentAssignmentBash ("TEST=$(echo 42)" )
309
309
assert assignment .evaluated_value ({}, container .environment_executor ) == "42"
310
310
311
311
312
- def test_podman_vfs (tmp_path : Path , monkeypatch , container_engine ):
312
+ def test_podman_vfs (
313
+ tmp_path : Path , monkeypatch : pytest .MonkeyPatch , container_engine : OCIContainerEngineConfig
314
+ ) -> None :
313
315
if container_engine .name != "podman" :
314
316
pytest .skip ("only runs with podman" )
315
317
if sys .platform .startswith ("darwin" ):
@@ -391,7 +393,7 @@ def test_podman_vfs(tmp_path: Path, monkeypatch, container_engine):
391
393
subprocess .run (["podman" , "unshare" , "rm" , "-rf" , vfs_path ], check = True )
392
394
393
395
394
- def test_create_args_volume (tmp_path : Path , container_engine ) :
396
+ def test_create_args_volume (tmp_path : Path , container_engine : OCIContainerEngineConfig ) -> None :
395
397
if container_engine .name != "docker" :
396
398
pytest .skip ("only runs with docker" )
397
399
@@ -513,7 +515,12 @@ def test_enforce_32_bit(container_engine):
513
515
("{name}; disable_host_mount: true" , False ),
514
516
],
515
517
)
516
- def test_disable_host_mount (tmp_path : Path , container_engine , config , should_have_host_mount ):
518
+ def test_disable_host_mount (
519
+ tmp_path : Path ,
520
+ container_engine : OCIContainerEngineConfig ,
521
+ config : str ,
522
+ should_have_host_mount : bool ,
523
+ ) -> None :
517
524
if detect_ci_provider () in {CIProvider .circle_ci , CIProvider .gitlab }:
518
525
pytest .skip ("Skipping test because docker on this platform does not support host mounts" )
519
526
if sys .platform .startswith ("darwin" ):
@@ -536,7 +543,9 @@ def test_disable_host_mount(tmp_path: Path, container_engine, config, should_hav
536
543
537
544
538
545
@pytest .mark .parametrize ("platform" , list (OCIPlatform ))
539
- def test_local_image (container_engine , platform , tmp_path : Path ):
546
+ def test_local_image (
547
+ container_engine : OCIContainerEngineConfig , platform : OCIPlatform , tmp_path : Path
548
+ ) -> None :
540
549
if (
541
550
detect_ci_provider () in {CIProvider .travis_ci }
542
551
and pm in {"s390x" , "ppc64le" }
0 commit comments