From 2afeca62a1fd4f194387507a13ace7f16d791702 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Mon, 15 May 2023 09:13:28 +0100 Subject: [PATCH] Don't run test unless docker is available --- unit_test/oci_container_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unit_test/oci_container_test.py b/unit_test/oci_container_test.py index f16ce83b..7156b54f 100644 --- a/unit_test/oci_container_test.py +++ b/unit_test/oci_container_test.py @@ -300,7 +300,10 @@ def test_podman_vfs(tmp_path: Path, monkeypatch, request): subprocess.run(["podman", "unshare", "rm", "-rf", vfs_path], check=True) -def test_create_args(tmp_path: Path): +def test_create_args(tmp_path: Path, request): + if not request.config.getoption("--run-docker"): + pytest.skip("need --run-docker option to run") + test_mount_dir = tmp_path / "test_mount" test_mount_dir.mkdir() (test_mount_dir / "test_file.txt").write_text("1234")