From f1af13e54464c9d25a23e93cd1b011d6bc0cfa99 Mon Sep 17 00:00:00 2001 From: bigtedde Date: Sun, 9 Jul 2023 17:06:30 -0400 Subject: [PATCH] removed unittest skips --- src/borg/testsuite/archiver/bypass_lock_option.py | 4 +--- src/borg/testsuite/archiver/mount_cmds.py | 13 ++++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/borg/testsuite/archiver/bypass_lock_option.py b/src/borg/testsuite/archiver/bypass_lock_option.py index d5c77a641..06e10172b 100644 --- a/src/borg/testsuite/archiver/bypass_lock_option.py +++ b/src/borg/testsuite/archiver/bypass_lock_option.py @@ -1,5 +1,3 @@ -import unittest - import pytest from ...constants import * # NOQA @@ -110,7 +108,7 @@ def test_readonly_list(archiver): cmd(archiver, f"--repo={archiver.repository_location}", "rlist", "--bypass-lock") -@unittest.skipUnless(llfuse, "llfuse not installed") +@pytest.mark.skipif(not llfuse, reason="llfuse not installed") def test_readonly_mount(archiver): cmd(archiver, f"--repo={archiver.repository_location}", "rcreate", RK_ENCRYPTION) create_src_archive(archiver, "test") diff --git a/src/borg/testsuite/archiver/mount_cmds.py b/src/borg/testsuite/archiver/mount_cmds.py index ae9548aa3..a145aca5c 100644 --- a/src/borg/testsuite/archiver/mount_cmds.py +++ b/src/borg/testsuite/archiver/mount_cmds.py @@ -2,7 +2,6 @@ import errno import os import stat import sys -import unittest import pytest @@ -25,7 +24,7 @@ def pytest_generate_tests(metafunc): @requires_hardlinks -@unittest.skipUnless(llfuse, "llfuse not installed") +@pytest.mark.skipif(not llfuse, reason="llfuse not installed") def test_fuse_mount_hardlinks(archivers, request): archiver = request.getfixturevalue(archivers) repo_location = archiver.repository_location @@ -64,7 +63,7 @@ def test_fuse_mount_hardlinks(archivers, request): assert open("input/dir1/subdir/hardlink", "rb").read() == b"123456" -@unittest.skipUnless(llfuse, "llfuse not installed") +@pytest.mark.skipif(not llfuse, reason="llfuse not installed") def test_fuse(archivers, request): archiver = request.getfixturevalue(archivers) if archiver.EXE and fakeroot_detected(): @@ -173,7 +172,7 @@ def test_fuse(archivers, request): raise -@unittest.skipUnless(llfuse, "llfuse not installed") +@pytest.mark.skipif(not llfuse, reason="llfuse not installed") def test_fuse_versions_view(archivers, request): archiver = request.getfixturevalue(archivers) repo_location, input_path = archiver.repository_location, archiver.input_path @@ -208,7 +207,7 @@ def test_fuse_versions_view(archivers, request): assert open(hl3, "rb").read() == b"123456" -@unittest.skipUnless(llfuse, "llfuse not installed") +@pytest.mark.skipif(not llfuse, reason="llfuse not installed") def test_fuse_allow_damaged_files(archivers, request): archiver = request.getfixturevalue(archivers) repo_location, repo_path = archiver.repository_location, archiver.repository_path @@ -236,7 +235,7 @@ def test_fuse_allow_damaged_files(archivers, request): open(os.path.join(mountpoint, "archive", path)).close() -@unittest.skipUnless(llfuse, "llfuse not installed") +@pytest.mark.skipif(not llfuse, reason="llfuse not installed") def test_fuse_mount_options(archivers, request): archiver = request.getfixturevalue(archivers) repo_location = archiver.repository_location @@ -261,7 +260,7 @@ def test_fuse_mount_options(archivers, request): assert sorted(os.listdir(os.path.join(mountpoint))) == [] -@unittest.skipUnless(llfuse, "llfuse not installed") +@pytest.mark.skipif(not llfuse, reason="llfuse not installed") def test_migrate_lock_alive(archivers, request): archiver = request.getfixturevalue(archivers) if archiver.prefix == "ssh://__testsuite__":