...........F.........F...........................EEEEEE..EEF.FFEEEE.FFFF [ 23%]
FFF..s.F...FF................F..FF.....F.F.EE............F.FF.EE....F..F [ 47%]
EF..FF...FF.F..................F..E...F.......s..EE..................... [ 70%]
.........................................................FFFF........... [ 94%]
...........F......                                                       [100%]
=================================== ERRORS ====================================
_____________ ERROR at setup of test_identical_tree_is_zero_diffs _____________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_identical_tree_is_zero_di0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_identical_tree_is_zero_di0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_identical_tree_is_zero_di0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
___ ERROR at setup of test_single_byte_change_is_exit_2_and_names_the_file ____

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_single_byte_change_is_exi0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_single_byte_change_is_exi0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_single_byte_change_is_exi0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
________________ ERROR at setup of test_size_change_is_exit_2 _________________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_size_change_is_exit_20')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_size_change_is_exit_20/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_size_change_is_exit_20\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_______________ ERROR at setup of test_all_offenders_are_named ________________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_all_offenders_are_named0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_all_offenders_are_named0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_all_offenders_are_named0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_________ ERROR at setup of test_symlink_target_difference_is_exit_2 __________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlink_target_difference0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlink_target_difference0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_symlink_target_difference0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
________ ERROR at setup of test_excluded_path_differing_is_still_zero _________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_excluded_path_differing_i0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_excluded_path_differing_i0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_excluded_path_differing_i0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
____________ ERROR at setup of test_excludes_are_passed_to_restic _____________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_excludes_are_passed_to_re0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_excludes_are_passed_to_re0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_excludes_are_passed_to_re0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
____ ERROR at setup of test_no_source_flag_skips_compare_and_returns_zero _____

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_no_source_flag_skips_comp0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_no_source_flag_skips_comp0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_no_source_flag_skips_comp0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_ ERROR at setup of test_strict_promotes_an_empty_directory_warning_to_exit_2 _

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_strict_promotes_an_empty_0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_strict_promotes_an_empty_0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_strict_promotes_an_empty_0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
________ ERROR at setup of test_four_exit_codes_in_one_cron_style_run _________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_four_exit_codes_in_one_cr0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_four_exit_codes_in_one_cr0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_four_exit_codes_in_one_cr0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
______________ ERROR at setup of test_source_is_never_written_to ______________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_source_is_never_written_t0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_source_is_never_written_t0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_source_is_never_written_t0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
___ ERROR at setup of test_compare_json_reports_offenders_and_both_digests ____

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_compare_json_reports_offe0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_compare_json_reports_offe0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_compare_json_reports_offe0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
___ ERROR at setup of test_mismatch_json_is_pure_and_is_not_an_error_object ___

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_mismatch_json_is_pure_and0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_mismatch_json_is_pure_and0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_mismatch_json_is_pure_and0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_________ ERROR at setup of test_every_mode_shares_the_top_level_keys _________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_every_mode_shares_the_top0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_every_mode_shares_the_top0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_every_mode_shares_the_top0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
________ ERROR at setup of test_schema_and_contract_keys_in_every_mode ________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_schema_and_contract_keys_0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_schema_and_contract_keys_0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_schema_and_contract_keys_0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
___________ ERROR at setup of test_all_four_exit_codes_in_json_mode ___________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_all_four_exit_codes_in_js0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_all_four_exit_codes_in_js0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_all_four_exit_codes_in_js0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_____________ ERROR at setup of test_run_writes_a_row_on_mismatch _____________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_run_writes_a_row_on_misma0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_run_writes_a_row_on_misma0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_run_writes_a_row_on_misma0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_____ ERROR at setup of test_row_matches_the_envelope_for_all_four_states _____

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_row_matches_the_envelope_0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_row_matches_the_envelope_0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_row_matches_the_envelope_0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
______________ ERROR at setup of test_demo_line_shape_end_to_end ______________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_demo_line_shape_end_to_en0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_demo_line_shape_end_to_en0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_demo_line_shape_end_to_en0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_____ ERROR at setup of test_demo_line_reports_diffs_with_the_same_shape ______

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_demo_line_reports_diffs_w0')

    @pytest.fixture
    def source_tree(tmp_path):
        """A source directory that is byte-identical to what the fake restores."""
        root = tmp_path / "source"
        root.mkdir()
>       return plant_fake_tree(root)

tests\conftest.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\conftest.py:108: in plant_fake_tree
    (Path(root) / rel).symlink_to(dest)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_demo_line_reports_diffs_w0/source/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_demo_line_reports_diffs_w0\\source\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
================================== FAILURES ===================================
_________________ test_verifies_newest_snapshot_and_cleans_up _________________

fake_restic = <conftest._FakeRestic object at 0x00000210DFC6BB60>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_verifies_newest_snapshot_0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_verifies_newest_snapshot_0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFC9ED50>

    def test_verifies_newest_snapshot_and_cleans_up(fake_restic, tmp_base, config_path, capsys):
        code = main(["run", "-r", "/srv/backup"])
        out = capsys.readouterr().out
>       assert code == EXIT_PASS
E       assert 1 == 0

tests\test_i1_run.py:27: AssertionError
_______________ test_sigkill_leftover_is_swept_by_the_next_run ________________

fake_restic = <conftest._FakeRestic object at 0x00000210DFE94C50>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_sigkill_leftover_is_swept0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_sigkill_leftover_is_swept0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFEED130>

    def test_sigkill_leftover_is_swept_by_the_next_run(fake_restic, tmp_base, config_path, capsys):
        prog = ("import sys; sys.path.insert(0, %r);"
                "from restverify import tempstore;"
                "print(tempstore.make_restore_dir('/srv/backup'));"
                "sys.stdout.flush(); import time; time.sleep(30)" % SRC)
        child = subprocess.Popen([sys.executable, "-c", prog], stdout=subprocess.PIPE, text=True)
        leftover = Path(child.stdout.readline().strip())
        assert leftover.is_dir()
        child.kill()                      # SIGKILL: no finally block, no atexit
        child.wait(timeout=10)
        assert leftover.is_dir(), "SIGKILL must leave the dir behind - that is the point"
    
        code = main(["run", "-r", "/srv/backup"])
        out = capsys.readouterr().out
>       assert code == EXIT_PASS
E       assert 1 == 0

tests\test_i1_run.py:136: AssertionError
____________ test_no_source_configured_skips_with_a_teaching_note _____________

fake_restic = <conftest._FakeRestic object at 0x00000210DFF20910>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_no_source_configured_skip0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_no_source_configured_skip0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFF6A5F0>

    def test_no_source_configured_skips_with_a_teaching_note(
            fake_restic, tmp_base, config_path, capsys):
        code = main(["run", "-r", "/srv/backup"])
        out = capsys.readouterr().out
>       assert code == EXIT_PASS
E       assert 1 == 0

tests\test_i2_compare.py:174: AssertionError
___________________ test_missing_source_is_a_teaching_error ___________________

fake_restic = <conftest._FakeRestic object at 0x00000210DFE19640>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_missing_source_is_a_teach0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_missing_source_is_a_teach0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFECFE70>

    def test_missing_source_is_a_teaching_error(fake_restic, tmp_base, config_path, capsys):
        code = main(["run", "-r", "/srv/backup", "-s", "/definitely/not/here"])
        err = capsys.readouterr().err
        assert code == EXIT_RESTORE_FAIL
>       assert "does not exist" in err
E       assert 'does not exist' in "restverify: restic restore failed (exit 1).\n  next: run `restic -r <repo> snapshots` by hand to see the underlying e...est-of-niffy\\\\pytest-7\\\\test_missing_source_is_a_teach0\\\\tmpbase\\\\restverify-restore-17524-x5ngpngy\\\\link'\n"

tests\test_i2_compare.py:192: AssertionError
_____________________ test_source_that_is_a_file_teaches ______________________

fake_restic = <conftest._FakeRestic object at 0x00000210E01257D0>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_source_that_is_a_file_tea0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_source_that_is_a_file_tea0/config.toml')
tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_source_that_is_a_file_tea0')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFF043D0>

    def test_source_that_is_a_file_teaches(fake_restic, tmp_base, config_path,
                                           tmp_path, capsys):
        a_file = tmp_path / "not-a-dir.txt"
        a_file.write_text("x", encoding="utf-8")
        code = main(["run", "-r", "/srv/backup", "-s", str(a_file)])
        err = capsys.readouterr().err
        assert code == EXIT_RESTORE_FAIL
>       assert "is not a directory" in err
E       assert 'is not a directory' in "restverify: restic restore failed (exit 1).\n  next: run `restic -r <repo> snapshots` by hand to see the underlying e...est-of-niffy\\\\pytest-7\\\\test_source_that_is_a_file_tea0\\\\tmpbase\\\\restverify-restore-17524-ovj_pnch\\\\link'\n"

tests\test_i2_compare.py:205: AssertionError
_______________________ test_counts_and_bytes_are_exact _______________________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_counts_and_bytes_are_exac0')

    def test_counts_and_bytes_are_exact(tmp_path):
>       man = manifestmod.build(plant(tmp_path / "tree"))

tests\test_i2_manifest.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_i2_manifest.py:26: in plant
    (root / "link").symlink_to("restored.txt")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_counts_and_bytes_are_exac0/tree/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_counts_and_bytes_are_exac0\\tree\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
______________ test_per_directory_rollup_is_direct_and_recursive ______________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_per_directory_rollup_is_d0')

    def test_per_directory_rollup_is_direct_and_recursive(tmp_path):
>       man = manifestmod.build(plant(tmp_path / "tree"))

tests\test_i2_manifest.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_i2_manifest.py:26: in plant
    (root / "link").symlink_to("restored.txt")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_per_directory_rollup_is_d0/tree/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_per_directory_rollup_is_d0\\tree\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
________________________ test_largest_file_is_reported ________________________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_largest_file_is_reported0')

    def test_largest_file_is_reported(tmp_path):
>       man = manifestmod.build(plant(tmp_path / "tree"))

tests\test_i2_manifest.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_i2_manifest.py:26: in plant
    (root / "link").symlink_to("restored.txt")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_largest_file_is_reported0/tree/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_largest_file_is_reported0\\tree\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
___________________ test_symlinks_are_recorded_not_followed ___________________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlinks_are_recorded_not0')

    def test_symlinks_are_recorded_not_followed(tmp_path):
>       tree = plant(tmp_path / "tree")

tests\test_i2_manifest.py:64: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_i2_manifest.py:26: in plant
    (root / "link").symlink_to("restored.txt")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlinks_are_recorded_not0/tree/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_symlinks_are_recorded_not0\\tree\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_____________________ test_symlink_targets_are_preserved ______________________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlink_targets_are_prese0')

    def test_symlink_targets_are_preserved(tmp_path):
>       man = manifestmod.build(plant(tmp_path / "tree"))

tests\test_i2_manifest.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_i2_manifest.py:26: in plant
    (root / "link").symlink_to("restored.txt")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlink_targets_are_prese0/tree/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_symlink_targets_are_prese0\\tree\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_______________ test_symlinked_directory_is_not_descended_into ________________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlinked_directory_is_no0')

    def test_symlinked_directory_is_not_descended_into(tmp_path):
        tree = tmp_path / "tree"
        real = tree / "real"
        real.mkdir(parents=True)
        (real / "a.txt").write_text("a", encoding="utf-8")
>       (tree / "loop").symlink_to(real, target_is_directory=True)

tests\test_i2_manifest.py:94: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlinked_directory_is_no0/tree/loop')
target = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlinked_directory_is_no0/tree/real')
target_is_directory = True

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_symlinked_directory_is_no0\\tree\\real' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_symlinked_directory_is_no0\\tree\\loop'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
______________ test_owned_top_level_entries_are_ignored_visibly _______________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_owned_top_level_entries_a0')

    def test_owned_top_level_entries_are_ignored_visibly(tmp_path):
        """restverify's own tempstore marker is not restored data — and the skip is
        recorded in the manifest, never silent (G6). A nested file of the same name
        is *not* ours and must still be counted."""
>       tree = plant(tmp_path / "tree")

tests\test_i2_manifest.py:104: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_i2_manifest.py:26: in plant
    (root / "link").symlink_to("restored.txt")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_owned_top_level_entries_a0/tree/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_owned_top_level_entries_a0\\tree\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_______ test_a_vanishing_directory_teaches_instead_of_partial_manifest ________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_a_vanishing_directory_tea0')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000210DFF04360>

    def test_a_vanishing_directory_teaches_instead_of_partial_manifest(tmp_path, monkeypatch):
>       tree = plant(tmp_path / "tree")

tests\test_i2_manifest.py:165: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_i2_manifest.py:26: in plant
    (root / "link").symlink_to("restored.txt")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_a_vanishing_directory_tea0/tree/link')
target = 'restored.txt', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_a_vanishing_directory_tea0\\tree\\link'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
_________________ test_run_human_line_reports_counts_and_size _________________

fake_restic = <conftest._FakeRestic object at 0x00000210DFF8B3B0>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_run_human_line_reports_co0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_run_human_line_reports_co0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFF69320>

    def test_run_human_line_reports_counts_and_size(fake_restic, tmp_base, config_path, capsys):
        code = main(["run", "-r", "/srv/backup"])
        out = capsys.readouterr().out
>       assert code == EXIT_PASS
E       assert 1 == 0

tests\test_i2_manifest.py:207: AssertionError
_______________ test_json_run_emits_manifest_compare_and_schema _______________

fake_restic = <conftest._FakeRestic object at 0x00000210DFF88A70>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_json_run_emits_manifest_c0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_json_run_emits_manifest_c0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFF6B770>

    def test_json_run_emits_manifest_compare_and_schema(
            fake_restic, tmp_base, config_path, capsys):
        code = main(["run", "-r", "/srv/backup", "--json"])
        captured = capsys.readouterr()
>       assert code == EXIT_PASS
E       assert 1 == 0

tests\test_i2_manifest.py:218: AssertionError
_________ test_symlink_swapped_after_the_manifest_is_a_teaching_error _________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlink_swapped_after_the0')

    def test_symlink_swapped_after_the_manifest_is_a_teaching_error(tmp_path):
        """O_NOFOLLOW: a path that became a link is an error, never a read of the
        link target (which could be outside the restore tree entirely)."""
        root = tmp_path / "tree"
        root.mkdir()
        (root / "a.txt").write_text("a", encoding="utf-8")
        man = manifestmod.build(root)
        (root / "a.txt").unlink()
>       (root / "a.txt").symlink_to("/etc/passwd")

tests\test_i2_sampling.py:129: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_symlink_swapped_after_the0/tree/a.txt')
target = '/etc/passwd', target_is_directory = False

    def symlink_to(self, target, target_is_directory=False):
        """
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        """
>       os.symlink(target, self, target_is_directory)
E       OSError: [WinError 1314] A required privilege is not held by the client: '/etc/passwd' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_symlink_swapped_after_the0\\tree\\a.txt'

..\AppData\Local\Python\pythoncore-3.14-64\Lib\pathlib\__init__.py:1213: OSError
______________ test_json_sample_block_is_reproducible_end_to_end ______________

fake_restic = <conftest._FakeRestic object at 0x00000210DFF33050>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_json_sample_block_is_repr0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_json_sample_block_is_repr0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFF4BEE0>

    def test_json_sample_block_is_reproducible_end_to_end(fake_restic, tmp_base,
                                                          config_path, capsys):
        code = main(["run", "-r", "/srv/backup", "--json"])
        payload = json.loads(capsys.readouterr().out)
>       assert code == EXIT_PASS
E       assert 1 == 0

tests\test_i2_sampling.py:158: AssertionError
____________________ test_run_human_line_prints_the_digest ____________________

fake_restic = <conftest._FakeRestic object at 0x00000210DFF33EF0>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_run_human_line_prints_the0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_run_human_line_prints_the0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFF48FA0>

    def test_run_human_line_prints_the_digest(fake_restic, tmp_base, config_path, capsys):
        main(["run", "-r", "/srv/backup"])
        out = capsys.readouterr().out
>       assert "sha256:" in out
E       AssertionError: assert 'sha256:' in ''

tests\test_i2_sampling.py:173: AssertionError
__________________ test_missing_source_is_json_1_kind_source __________________

fake_restic = <conftest._FakeRestic object at 0x00000210DFF32390>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_missing_source_is_json_1_0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_missing_source_is_json_1_0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFF4ADD0>

    def test_missing_source_is_json_1_kind_source(fake_restic, tmp_base, config_path, capsys):
        code, captured = run_json(
            capsys, ["run", "-r", "/srv/backup", "-s", "/definitely/not/here", "--json"])
        assert code == EXIT_RESTORE_FAIL
        payload = pure_json(captured.out)
>       assert payload["error"]["kind"] == "source"
E       AssertionError: assert 'restic_failed' == 'source'
E         
E         - source
E         + restic_failed

tests\test_i3a_json.py:103: AssertionError
______________ test_success_json_is_pure_and_compare_is_skipped _______________

fake_restic = <conftest._FakeRestic object at 0x00000210DFFE5730>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_success_json_is_pure_and_0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_success_json_is_pure_and_0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E0059080>

    def test_success_json_is_pure_and_compare_is_skipped(fake_restic, tmp_base,
                                                         config_path, capsys):
        code, captured = run_json(capsys, ["run", "-r", "/srv/backup", "--json"])
>       assert code == EXIT_PASS
E       assert 1 == 0

tests\test_i3a_json.py:124: AssertionError
_________________________ test_kind_source_maps_to_1 __________________________

fake_restic = <conftest._FakeRestic object at 0x00000210DFFE65D0>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_kind_source_maps_to_10/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_kind_source_maps_to_10/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E005B4D0>

    def test_kind_source_maps_to_1(fake_restic, tmp_base, config_path, capsys):
        code = main(["run", "-r", "/srv/backup", "-s", "/definitely/not/here", "--json"])
>       assert_kind(captured_error(capsys), "source", code)

tests\test_i3b_taxonomy.py:108: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

payload = {'command': 'run', 'error': {'hint': 'run `restic -r <repo> snapshots` by hand to see the underlying error', 'kind': '...verify-restore-17524-fkl7psa7\\\\link\'', 'what': 'restic restore failed (exit 1).'}, 'exit_code': 1, 'schema': 1, ...}
kind = 'source', code = 1

    def assert_kind(payload, kind: str, code: int) -> None:
>       assert payload["error"]["kind"] == kind
E       AssertionError: assert 'restic_failed' == 'source'
E         
E         - source
E         + restic_failed

tests\test_i3b_taxonomy.py:35: AssertionError
________________________ test_kind_manifest_maps_to_1 _________________________

fake_restic = <conftest._FakeRestic object at 0x00000210DFFE7710>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_kind_manifest_maps_to_10/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_kind_manifest_maps_to_10/config.toml')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000210E0059E80>
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E0058360>

    def test_kind_manifest_maps_to_1(fake_restic, tmp_base, config_path, monkeypatch, capsys):
        def boom(*args, **kwargs):
            raise errors.ManifestError("manifest exploded", hint="re-run")
    
        monkeypatch.setattr("restverify.cli.manifestmod.build", boom)
        code = main(["run", "-r", "/srv/backup", "--json"])
>       assert_kind(captured_error(capsys), "manifest", code)

tests\test_i3b_taxonomy.py:125: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

payload = {'command': 'run', 'error': {'hint': 'run `restic -r <repo> snapshots` by hand to see the underlying error', 'kind': '...verify-restore-17524-g3hzpkhc\\\\link\'', 'what': 'restic restore failed (exit 1).'}, 'exit_code': 1, 'schema': 1, ...}
kind = 'manifest', code = 1

    def assert_kind(payload, kind: str, code: int) -> None:
>       assert payload["error"]["kind"] == kind
E       AssertionError: assert 'restic_failed' == 'manifest'
E         
E         - manifest
E         + restic_failed

tests\test_i3b_taxonomy.py:35: AssertionError
_________________________ test_kind_sample_maps_to_1 __________________________

fake_restic = <conftest._FakeRestic object at 0x00000210DFFE6E10>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_kind_sample_maps_to_10/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_kind_sample_maps_to_10/config.toml')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000210E00590F0>
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E0059B00>

    def test_kind_sample_maps_to_1(fake_restic, tmp_base, config_path, monkeypatch, capsys):
        def boom(*args, **kwargs):
            raise errors.SampleError("sample exploded", hint="re-run")
    
        monkeypatch.setattr("restverify.cli.samplingmod.sample_tree", boom)
        code = main(["run", "-r", "/srv/backup", "--json"])
>       assert_kind(captured_error(capsys), "sample", code)

tests\test_i3b_taxonomy.py:135: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

payload = {'command': 'run', 'error': {'hint': 'run `restic -r <repo> snapshots` by hand to see the underlying error', 'kind': '...verify-restore-17524-10z9gntt\\\\link\'', 'what': 'restic restore failed (exit 1).'}, 'exit_code': 1, 'schema': 1, ...}
kind = 'sample', code = 1

    def assert_kind(payload, kind: str, code: int) -> None:
>       assert payload["error"]["kind"] == kind
E       AssertionError: assert 'restic_failed' == 'sample'
E         
E         - sample
E         + restic_failed

tests\test_i3b_taxonomy.py:35: AssertionError
_____________________ test_store_is_created_on_first_run ______________________

fake_restic = <conftest._FakeRestic object at 0x00000210DFF33050>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_store_is_created_on_first0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_store_is_created_on_first0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210DFF49320>
isolated_state = WindowsPath('C:/Users/niffy/AppData/Local/Temp/restverify-states-ugu_rcfu/state-a5acf18caf1c4fd1b56496b5d67b2e8d')

    def test_store_is_created_on_first_run(fake_restic, tmp_base, config_path,
                                           capsys, isolated_state):
        assert not isolated_state.exists()
>       assert main(["run", "-r", "/srv/backup"]) == EXIT_PASS
E       AssertionError: assert 1 == 0
E        +  where 1 = main(['run', '-r', '/srv/backup'])

tests\test_i4a_history.py:61: AssertionError
---------------------------- Captured stderr call -----------------------------
restverify: restic restore failed (exit 1).
  next: run `restic -r <repo> snapshots` by hand to see the underlying error
  restic said:   File "C:\Users\niffy\AppData\Local\Temp\pytest-of-niffy\pytest-7\test_store_is_created_on_first0\bin\restic", line 50, in <module> |     os.symlink(dest, os.path.join(target, rel)) |     ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_store_is_created_on_first0\\tmpbase\\restverify-restore-17524-vd7dpfa4\\link'
________________________ test_run_writes_a_row_on_pass ________________________

fake_restic = <conftest._FakeRestic object at 0x00000210E00116D0>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_run_writes_a_row_on_pass0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_run_writes_a_row_on_pass0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E0014600>

    def test_run_writes_a_row_on_pass(fake_restic, tmp_base, config_path, capsys):
>       assert main(["run", "-r", "/srv/backup"]) == EXIT_PASS
E       AssertionError: assert 1 == 0
E        +  where 1 = main(['run', '-r', '/srv/backup'])

tests\test_i4a_history.py:90: AssertionError
---------------------------- Captured stderr call -----------------------------
restverify: restic restore failed (exit 1).
  next: run `restic -r <repo> snapshots` by hand to see the underlying error
  restic said:   File "C:\Users\niffy\AppData\Local\Temp\pytest-of-niffy\pytest-7\test_run_writes_a_row_on_pass0\bin\restic", line 50, in <module> |     os.symlink(dest, os.path.join(target, rel)) |     ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_run_writes_a_row_on_pass0\\tmpbase\\restverify-restore-17524-z9gr_8gk\\link'
________________ test_run_writes_a_row_on_error_with_the_kind _________________

fake_restic = <conftest._FakeRestic object at 0x00000210E0011F10>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_run_writes_a_row_on_error0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_run_writes_a_row_on_error0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E0014670>

    def test_run_writes_a_row_on_error_with_the_kind(fake_restic, tmp_base,
                                                     config_path, capsys):
        assert main(["run", "-r", "/srv/backup", "-s", "/definitely/not/here"]) == \
            EXIT_RESTORE_FAIL
        row = history.read_recent(limit=1)[0]
>       assert (row.status, row.exit_code, row.error_kind) == ("error", 1, "source")
E       AssertionError: assert ('error', 1, 'restic_failed') == ('error', 1, 'source')
E         
E         At index 2 diff: 'restic_failed' != 'source'
E         Use -v to get more diff

tests\test_i4a_history.py:115: AssertionError
---------------------------- Captured stderr call -----------------------------
restverify: restic restore failed (exit 1).
  next: run `restic -r <repo> snapshots` by hand to see the underlying error
  restic said:   File "C:\Users\niffy\AppData\Local\Temp\pytest-of-niffy\pytest-7\test_run_writes_a_row_on_error0\bin\restic", line 50, in <module> |     os.symlink(dest, os.path.join(target, rel)) |     ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_run_writes_a_row_on_error0\\tmpbase\\restverify-restore-17524-eay4zcgv\\link'
____________________ test_no_source_run_still_writes_a_row ____________________

fake_restic = <conftest._FakeRestic object at 0x00000210E0010890>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_no_source_run_still_write0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_no_source_run_still_write0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E00159B0>

    def test_no_source_run_still_writes_a_row(fake_restic, tmp_base, config_path, capsys):
>       assert main(["run", "-r", "/srv/backup", "--no-source"]) == EXIT_PASS
E       AssertionError: assert 1 == 0
E        +  where 1 = main(['run', '-r', '/srv/backup', '--no-source'])

tests\test_i4a_history.py:131: AssertionError
---------------------------- Captured stderr call -----------------------------
restverify: restic restore failed (exit 1).
  next: run `restic -r <repo> snapshots` by hand to see the underlying error
  restic said:   File "C:\Users\niffy\AppData\Local\Temp\pytest-of-niffy\pytest-7\test_no_source_run_still_write0\bin\restic", line 50, in <module> |     os.symlink(dest, os.path.join(target, rel)) |     ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | OSError: [WinError 1314] A required privilege is not held by the client: 'restored.txt' -> 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_no_source_run_still_write0\\tmpbase\\restverify-restore-17524-nvee_f48\\link'
_________________ test_json_envelope_reports_the_written_row __________________

fake_restic = <conftest._FakeRestic object at 0x00000210E0010E90>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_json_envelope_reports_the0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_json_envelope_reports_the0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E00163C0>

    def test_json_envelope_reports_the_written_row(fake_restic, tmp_base,
                                                   config_path, capsys):
        main(["run", "-r", "/srv/backup", "--json"])
        payload = json.loads(capsys.readouterr().out)
>       assert payload["history"]["recorded"] is True
E       KeyError: 'history'

tests\test_i4a_history.py:142: KeyError
___________ test_corrupt_store_warns_but_does_not_fail_a_clean_run ____________

fake_restic = <conftest._FakeRestic object at 0x00000210E0011BB0>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_corrupt_store_warns_but_d0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_corrupt_store_warns_but_d0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E0016F90>

    def test_corrupt_store_warns_but_does_not_fail_a_clean_run(
            fake_restic, tmp_base, config_path, capsys):
        """Ruling 2: verification is the product; history is auxiliary."""
        write_corrupt(history.state_dir())
        code = main(["run", "-r", "/srv/backup"])
        captured = capsys.readouterr()
>       assert code == EXIT_PASS
E       assert 1 == 0

tests\test_i4a_history.py:191: AssertionError
_______ test_json_reports_a_failed_history_write_without_changing_exit ________

fake_restic = <conftest._FakeRestic object at 0x00000210DFFE7DD0>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_json_reports_a_failed_his0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_json_reports_a_failed_his0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E0059FD0>

    def test_json_reports_a_failed_history_write_without_changing_exit(
            fake_restic, tmp_base, config_path, capsys):
        write_corrupt(history.state_dir())
        code = main(["run", "-r", "/srv/backup", "--json"])
        payload = json.loads(capsys.readouterr().out)
>       assert code == EXIT_PASS and payload["exit_code"] == EXIT_PASS
E       assert (1 == 0)

tests\test_i4a_history.py:202: AssertionError
________ test_unwritable_state_dir_warns_but_does_not_fail_a_clean_run ________

fake_restic = <conftest._FakeRestic object at 0x00000210E0013590>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_unwritable_state_dir_warn0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_unwritable_state_dir_warn0/config.toml')
tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_unwritable_state_dir_warn0')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000210E005B7E0>
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E0058130>

    def test_unwritable_state_dir_warns_but_does_not_fail_a_clean_run(
            fake_restic, tmp_base, config_path, tmp_path, monkeypatch, capsys):
        blocked = tmp_path / "blocked"
        blocked.write_text("i am a file, not a directory", encoding="utf-8")
        monkeypatch.setenv(history.STATE_ENV, str(blocked))
        code = main(["run", "-r", "/srv/backup"])
        captured = capsys.readouterr()
>       assert code == EXIT_PASS
E       assert 1 == 0

tests\test_i4a_history.py:225: AssertionError
__________________ test_retention_keeps_the_newest_1000_rows __________________

fake_restic = <conftest._FakeRestic object at 0x00000210E0012810>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_retention_keeps_the_newes0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_retention_keeps_the_newes0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E00165F0>

    def test_retention_keeps_the_newest_1000_rows(fake_restic, tmp_base, config_path,
                                                  capsys):
        bulk_seed(REPO, 1000)                     # 1 real + 1000 bulk = 1001 rows
        code = main(["run", "-r", REPO])          # this row triggers the prune
        captured = capsys.readouterr()
>       assert code == EXIT_PASS
E       assert 1 == 0

tests\test_i4c_retention.py:58: AssertionError
___________________ test_cron_line_uses_an_absolute_binary ____________________

capsys = <_pytest.capture.CaptureFixture object at 0x00000210E0015010>

    def test_cron_line_uses_an_absolute_binary(capsys):
        """A bare name is the classic cron failure: the scheduler's PATH is minimal."""
        main(["cron", "-r", "/srv/backup"])
        line = capsys.readouterr().out.strip()
        command = line.split(None, 5)[5]
>       assert command.split()[0].startswith("/"), command
E       AssertionError: C:\Users\niffy\restverify\.venv\Scripts\python.exe -m restverify run -r /srv/backup
E       assert False
E        +  where False = <built-in method startswith of str object at 0x00000210E0013DB0>('/')
E        +    where <built-in method startswith of str object at 0x00000210E0013DB0> = 'C:\\Users\\niffy\\restverify\\.venv\\Scripts\\python.exe'.startswith

tests\test_i5a_cron.py:43: AssertionError
____ test_fake_restic_failures_exit_1_and_speak_restic_words[fail_restore] ____

fake_restic = <conftest._FakeRestic object at 0x00000210E01814F0>
mode = 'fail_restore'
tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_fake_restic_failures_exit0')

    @pytest.mark.parametrize("mode", sorted(REAL_FAILURES))
    def test_fake_restic_failures_exit_1_and_speak_restic_words(fake_restic, mode, tmp_path):
        """The fake must not invent exit codes: restic 0.16.4 returns 1 for all three."""
        args, expected_stderr = REAL_FAILURES[mode]
        args = [a.format(target=str(tmp_path / "restore")) for a in args]
>       proc = _run_fake(fake_restic, mode, *args)

tests\test_i7b_reconciliation.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_i7b_reconciliation.py:104: in _run_fake
    return subprocess.run([str(fake_restic.path), *args], capture_output=True, text=True)
..\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py:555: in run
    with Popen(*popenargs, **kwargs) as process:
..\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py:1039: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Popen: returncode: None args: ['C:\\Users\\niffy\\AppData\\Local\\Temp\\pyt...>
args = 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_fake_restic_failures_exit0\\bin\\restic resto...s\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_fake_restic_failures_exit0\\restore --repo /srv/backup'
executable = None, preexec_fn = None, close_fds = False, pass_fds = ()
cwd = None, env = None
startupinfo = <subprocess.STARTUPINFO object at 0x00000210E03F1E50>
creationflags = 0, shell = False, p2cread = Handle(868), p2cwrite = -1
c2pread = 11, c2pwrite = Handle(872), errread = 12, errwrite = Handle(636)
unused_restore_signals = True, unused_gid = None, unused_gids = None
unused_uid = None, unused_umask = -1, unused_start_new_session = False
unused_process_group = -1

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       unused_restore_signals,
                       unused_gid, unused_gids, unused_uid,
                       unused_umask,
                       unused_start_new_session, unused_process_group):
        """Execute program (MS Windows version)"""
    
        assert not pass_fds, "pass_fds not supported on Windows."
    
        if isinstance(args, str):
            pass
        elif isinstance(args, bytes):
            if shell:
                raise TypeError('bytes args is not allowed on Windows')
            args = list2cmdline([args])
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = list2cmdline([args])
        else:
            args = list2cmdline(args)
    
        if executable is not None:
            executable = os.fsdecode(executable)
    
        # Process startup details
        if startupinfo is None:
            startupinfo = STARTUPINFO()
        else:
            # bpo-34044: Copy STARTUPINFO since it is modified above,
            # so the caller can reuse it multiple times.
            startupinfo = startupinfo.copy()
    
        use_std_handles = -1 not in (p2cread, c2pwrite, errwrite)
        if use_std_handles:
            startupinfo.dwFlags |= _winapi.STARTF_USESTDHANDLES
            startupinfo.hStdInput = p2cread
            startupinfo.hStdOutput = c2pwrite
            startupinfo.hStdError = errwrite
    
        attribute_list = startupinfo.lpAttributeList
        have_handle_list = bool(attribute_list and
                                "handle_list" in attribute_list and
                                attribute_list["handle_list"])
    
        # If we were given an handle_list or need to create one
        if have_handle_list or (use_std_handles and close_fds):
            if attribute_list is None:
                attribute_list = startupinfo.lpAttributeList = {}
            handle_list = attribute_list["handle_list"] = \
                list(attribute_list.get("handle_list", []))
    
            if use_std_handles:
                handle_list += [int(p2cread), int(c2pwrite), int(errwrite)]
    
            handle_list[:] = self._filter_handle_list(handle_list)
    
            if handle_list:
                if not close_fds:
                    warnings.warn("startupinfo.lpAttributeList['handle_list'] "
                                  "overriding close_fds", RuntimeWarning)
    
                # When using the handle_list we always request to inherit
                # handles but the only handles that will be inherited are
                # the ones in the handle_list
                close_fds = False
    
        if shell:
            startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
            startupinfo.wShowWindow = _winapi.SW_HIDE
            if not executable:
                # gh-101283: without a fully-qualified path, before Windows
                # checks the system directories, it first looks in the
                # application directory, and also the current directory if
                # NeedCurrentDirectoryForExePathW(ExeName) is true, so try
                # to avoid executing unqualified "cmd.exe".
                comspec = os.environ.get('ComSpec')
                if not comspec:
                    system_root = os.environ.get('SystemRoot', '')
                    comspec = os.path.join(system_root, 'System32', 'cmd.exe')
                    if not os.path.isabs(comspec):
                        raise FileNotFoundError('shell not found: neither %ComSpec% nor %SystemRoot% is set')
                if os.path.isabs(comspec):
                    executable = comspec
            else:
                comspec = executable
    
            args = '{} /c "{}"'.format (comspec, args)
    
        if cwd is not None:
            cwd = os.fsdecode(cwd)
    
        sys.audit("subprocess.Popen", executable, args, cwd, env)
    
        # Start the process
        try:
>           hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                                     # no special security
                                     None, None,
                                     int(not close_fds),
                                     creationflags,
                                     env,
                                     cwd,
                                     startupinfo)
E                                    OSError: [WinError 193] %1 is not a valid Win32 application

..\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py:1553: OSError
____ test_fake_restic_failures_exit_1_and_speak_restic_words[no_such_repo] ____

fake_restic = <conftest._FakeRestic object at 0x00000210E0478EF0>
mode = 'no_such_repo'
tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_fake_restic_failures_exit1')

    @pytest.mark.parametrize("mode", sorted(REAL_FAILURES))
    def test_fake_restic_failures_exit_1_and_speak_restic_words(fake_restic, mode, tmp_path):
        """The fake must not invent exit codes: restic 0.16.4 returns 1 for all three."""
        args, expected_stderr = REAL_FAILURES[mode]
        args = [a.format(target=str(tmp_path / "restore")) for a in args]
>       proc = _run_fake(fake_restic, mode, *args)

tests\test_i7b_reconciliation.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_i7b_reconciliation.py:104: in _run_fake
    return subprocess.run([str(fake_restic.path), *args], capture_output=True, text=True)
..\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py:555: in run
    with Popen(*popenargs, **kwargs) as process:
..\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py:1039: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Popen: returncode: None args: ['C:\\Users\\niffy\\AppData\\Local\\Temp\\pyt...>
args = 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_fake_restic_failures_exit1\\bin\\restic snapshots --json --repo /srv/backup'
executable = None, preexec_fn = None, close_fds = False, pass_fds = ()
cwd = None, env = None
startupinfo = <subprocess.STARTUPINFO object at 0x00000210E03C6350>
creationflags = 0, shell = False, p2cread = Handle(880), p2cwrite = -1
c2pread = 11, c2pwrite = Handle(868), errread = 12, errwrite = Handle(588)
unused_restore_signals = True, unused_gid = None, unused_gids = None
unused_uid = None, unused_umask = -1, unused_start_new_session = False
unused_process_group = -1

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       unused_restore_signals,
                       unused_gid, unused_gids, unused_uid,
                       unused_umask,
                       unused_start_new_session, unused_process_group):
        """Execute program (MS Windows version)"""
    
        assert not pass_fds, "pass_fds not supported on Windows."
    
        if isinstance(args, str):
            pass
        elif isinstance(args, bytes):
            if shell:
                raise TypeError('bytes args is not allowed on Windows')
            args = list2cmdline([args])
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = list2cmdline([args])
        else:
            args = list2cmdline(args)
    
        if executable is not None:
            executable = os.fsdecode(executable)
    
        # Process startup details
        if startupinfo is None:
            startupinfo = STARTUPINFO()
        else:
            # bpo-34044: Copy STARTUPINFO since it is modified above,
            # so the caller can reuse it multiple times.
            startupinfo = startupinfo.copy()
    
        use_std_handles = -1 not in (p2cread, c2pwrite, errwrite)
        if use_std_handles:
            startupinfo.dwFlags |= _winapi.STARTF_USESTDHANDLES
            startupinfo.hStdInput = p2cread
            startupinfo.hStdOutput = c2pwrite
            startupinfo.hStdError = errwrite
    
        attribute_list = startupinfo.lpAttributeList
        have_handle_list = bool(attribute_list and
                                "handle_list" in attribute_list and
                                attribute_list["handle_list"])
    
        # If we were given an handle_list or need to create one
        if have_handle_list or (use_std_handles and close_fds):
            if attribute_list is None:
                attribute_list = startupinfo.lpAttributeList = {}
            handle_list = attribute_list["handle_list"] = \
                list(attribute_list.get("handle_list", []))
    
            if use_std_handles:
                handle_list += [int(p2cread), int(c2pwrite), int(errwrite)]
    
            handle_list[:] = self._filter_handle_list(handle_list)
    
            if handle_list:
                if not close_fds:
                    warnings.warn("startupinfo.lpAttributeList['handle_list'] "
                                  "overriding close_fds", RuntimeWarning)
    
                # When using the handle_list we always request to inherit
                # handles but the only handles that will be inherited are
                # the ones in the handle_list
                close_fds = False
    
        if shell:
            startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
            startupinfo.wShowWindow = _winapi.SW_HIDE
            if not executable:
                # gh-101283: without a fully-qualified path, before Windows
                # checks the system directories, it first looks in the
                # application directory, and also the current directory if
                # NeedCurrentDirectoryForExePathW(ExeName) is true, so try
                # to avoid executing unqualified "cmd.exe".
                comspec = os.environ.get('ComSpec')
                if not comspec:
                    system_root = os.environ.get('SystemRoot', '')
                    comspec = os.path.join(system_root, 'System32', 'cmd.exe')
                    if not os.path.isabs(comspec):
                        raise FileNotFoundError('shell not found: neither %ComSpec% nor %SystemRoot% is set')
                if os.path.isabs(comspec):
                    executable = comspec
            else:
                comspec = executable
    
            args = '{} /c "{}"'.format (comspec, args)
    
        if cwd is not None:
            cwd = os.fsdecode(cwd)
    
        sys.audit("subprocess.Popen", executable, args, cwd, env)
    
        # Start the process
        try:
>           hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                                     # no special security
                                     None, None,
                                     int(not close_fds),
                                     creationflags,
                                     env,
                                     cwd,
                                     startupinfo)
E                                    OSError: [WinError 193] %1 is not a valid Win32 application

..\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py:1553: OSError
___ test_fake_restic_failures_exit_1_and_speak_restic_words[wrong_password] ___

fake_restic = <conftest._FakeRestic object at 0x00000210E047AF30>
mode = 'wrong_password'
tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_fake_restic_failures_exit2')

    @pytest.mark.parametrize("mode", sorted(REAL_FAILURES))
    def test_fake_restic_failures_exit_1_and_speak_restic_words(fake_restic, mode, tmp_path):
        """The fake must not invent exit codes: restic 0.16.4 returns 1 for all three."""
        args, expected_stderr = REAL_FAILURES[mode]
        args = [a.format(target=str(tmp_path / "restore")) for a in args]
>       proc = _run_fake(fake_restic, mode, *args)

tests\test_i7b_reconciliation.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_i7b_reconciliation.py:104: in _run_fake
    return subprocess.run([str(fake_restic.path), *args], capture_output=True, text=True)
..\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py:555: in run
    with Popen(*popenargs, **kwargs) as process:
..\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py:1039: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Popen: returncode: None args: ['C:\\Users\\niffy\\AppData\\Local\\Temp\\pyt...>
args = 'C:\\Users\\niffy\\AppData\\Local\\Temp\\pytest-of-niffy\\pytest-7\\test_fake_restic_failures_exit2\\bin\\restic snapshots --json --repo /srv/backup'
executable = None, preexec_fn = None, close_fds = False, pass_fds = ()
cwd = None, env = None
startupinfo = <subprocess.STARTUPINFO object at 0x00000210E066C050>
creationflags = 0, shell = False, p2cread = Handle(872), p2cwrite = -1
c2pread = 11, c2pwrite = Handle(868), errread = 12, errwrite = Handle(708)
unused_restore_signals = True, unused_gid = None, unused_gids = None
unused_uid = None, unused_umask = -1, unused_start_new_session = False
unused_process_group = -1

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       unused_restore_signals,
                       unused_gid, unused_gids, unused_uid,
                       unused_umask,
                       unused_start_new_session, unused_process_group):
        """Execute program (MS Windows version)"""
    
        assert not pass_fds, "pass_fds not supported on Windows."
    
        if isinstance(args, str):
            pass
        elif isinstance(args, bytes):
            if shell:
                raise TypeError('bytes args is not allowed on Windows')
            args = list2cmdline([args])
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = list2cmdline([args])
        else:
            args = list2cmdline(args)
    
        if executable is not None:
            executable = os.fsdecode(executable)
    
        # Process startup details
        if startupinfo is None:
            startupinfo = STARTUPINFO()
        else:
            # bpo-34044: Copy STARTUPINFO since it is modified above,
            # so the caller can reuse it multiple times.
            startupinfo = startupinfo.copy()
    
        use_std_handles = -1 not in (p2cread, c2pwrite, errwrite)
        if use_std_handles:
            startupinfo.dwFlags |= _winapi.STARTF_USESTDHANDLES
            startupinfo.hStdInput = p2cread
            startupinfo.hStdOutput = c2pwrite
            startupinfo.hStdError = errwrite
    
        attribute_list = startupinfo.lpAttributeList
        have_handle_list = bool(attribute_list and
                                "handle_list" in attribute_list and
                                attribute_list["handle_list"])
    
        # If we were given an handle_list or need to create one
        if have_handle_list or (use_std_handles and close_fds):
            if attribute_list is None:
                attribute_list = startupinfo.lpAttributeList = {}
            handle_list = attribute_list["handle_list"] = \
                list(attribute_list.get("handle_list", []))
    
            if use_std_handles:
                handle_list += [int(p2cread), int(c2pwrite), int(errwrite)]
    
            handle_list[:] = self._filter_handle_list(handle_list)
    
            if handle_list:
                if not close_fds:
                    warnings.warn("startupinfo.lpAttributeList['handle_list'] "
                                  "overriding close_fds", RuntimeWarning)
    
                # When using the handle_list we always request to inherit
                # handles but the only handles that will be inherited are
                # the ones in the handle_list
                close_fds = False
    
        if shell:
            startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
            startupinfo.wShowWindow = _winapi.SW_HIDE
            if not executable:
                # gh-101283: without a fully-qualified path, before Windows
                # checks the system directories, it first looks in the
                # application directory, and also the current directory if
                # NeedCurrentDirectoryForExePathW(ExeName) is true, so try
                # to avoid executing unqualified "cmd.exe".
                comspec = os.environ.get('ComSpec')
                if not comspec:
                    system_root = os.environ.get('SystemRoot', '')
                    comspec = os.path.join(system_root, 'System32', 'cmd.exe')
                    if not os.path.isabs(comspec):
                        raise FileNotFoundError('shell not found: neither %ComSpec% nor %SystemRoot% is set')
                if os.path.isabs(comspec):
                    executable = comspec
            else:
                comspec = executable
    
            args = '{} /c "{}"'.format (comspec, args)
    
        if cwd is not None:
            cwd = os.fsdecode(cwd)
    
        sys.audit("subprocess.Popen", executable, args, cwd, env)
    
        # Start the process
        try:
>           hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                                     # no special security
                                     None, None,
                                     int(not close_fds),
                                     creationflags,
                                     env,
                                     cwd,
                                     startupinfo)
E                                    OSError: [WinError 193] %1 is not a valid Win32 application

..\AppData\Local\Python\pythoncore-3.14-64\Lib\subprocess.py:1553: OSError
____________ test_restore_failure_teaches_with_restic_own_sentence ____________

fake_restic = <conftest._FakeRestic object at 0x00000210E047BF50>
tmp_base = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_restore_failure_teaches_w0/tmpbase')
config_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_restore_failure_teaches_w0/config.toml')
capsys = <_pytest.capture.CaptureFixture object at 0x00000210E040A120>

    def test_restore_failure_teaches_with_restic_own_sentence(fake_restic, tmp_base,
                                                              config_path, capsys):
        """End to end: the tool quotes restic's real words, not the old fiction."""
        fake_restic.set_mode("fail_restore")
        code = main(["run", "-r", "/srv/backup"])
        err = capsys.readouterr().err
        assert code == EXIT_RESTORE_FAIL
        assert "restic restore failed (exit 1)" in err
>       assert "failed to find snapshot" in err
E       assert 'failed to find snapshot' in "restverify: restic restore failed (exit 1).\n  next: run `restic -r <repo> snapshots` by hand to see the underlying e...est-of-niffy\\\\pytest-7\\\\test_restore_failure_teaches_w0\\\\tmpbase\\\\restverify-restore-17524-md3mmzei\\\\link'\n"

tests\test_i7b_reconciliation.py:125: AssertionError
_____________ test_source_walk_prunes_exactly_what_restic_pruned ______________

tmp_path = WindowsPath('C:/Users/niffy/AppData/Local/Temp/pytest-of-niffy/pytest-7/test_source_walk_prunes_exactl0')

    def test_source_walk_prunes_exactly_what_restic_pruned(tmp_path):
        """D-I7-2: a root-prefixed pattern used to leave the pruned file in the
        source manifest, so a healthy restore was reported as a mismatch (exit 2)."""
        source = tmp_path / "srcB"
        (source / "data").mkdir(parents=True)
        (source / "app.log").write_text("log\n", encoding="utf-8")
        (source / "data" / "keep.txt").write_text("keep\n", encoding="utf-8")
        man = manifestmod.build(
            source, exclude=excludesmod.compile_matcher(["srcB/data/*.txt"], root=source))
>       assert [e.path for e in man.entries] == ["app.log"]
E       AssertionError: assert ['app.log', 'data/keep.txt'] == ['app.log']
E         
E         Left contains one more item: 'data/keep.txt'
E         Use -v to get more diff

tests\test_i7b_reconciliation.py:191: AssertionError
=========================== short test summary info ===========================
FAILED tests/test_i1_run.py::test_verifies_newest_snapshot_and_cleans_up - as...
FAILED tests/test_i1_run.py::test_sigkill_leftover_is_swept_by_the_next_run
FAILED tests/test_i2_compare.py::test_no_source_configured_skips_with_a_teaching_note
FAILED tests/test_i2_compare.py::test_missing_source_is_a_teaching_error - as...
FAILED tests/test_i2_compare.py::test_source_that_is_a_file_teaches - assert ...
FAILED tests/test_i2_manifest.py::test_counts_and_bytes_are_exact - OSError: ...
FAILED tests/test_i2_manifest.py::test_per_directory_rollup_is_direct_and_recursive
FAILED tests/test_i2_manifest.py::test_largest_file_is_reported - OSError: [W...
FAILED tests/test_i2_manifest.py::test_symlinks_are_recorded_not_followed - O...
FAILED tests/test_i2_manifest.py::test_symlink_targets_are_preserved - OSErro...
FAILED tests/test_i2_manifest.py::test_symlinked_directory_is_not_descended_into
FAILED tests/test_i2_manifest.py::test_owned_top_level_entries_are_ignored_visibly
FAILED tests/test_i2_manifest.py::test_a_vanishing_directory_teaches_instead_of_partial_manifest
FAILED tests/test_i2_manifest.py::test_run_human_line_reports_counts_and_size
FAILED tests/test_i2_manifest.py::test_json_run_emits_manifest_compare_and_schema
FAILED tests/test_i2_sampling.py::test_symlink_swapped_after_the_manifest_is_a_teaching_error
FAILED tests/test_i2_sampling.py::test_json_sample_block_is_reproducible_end_to_end
FAILED tests/test_i2_sampling.py::test_run_human_line_prints_the_digest - Ass...
FAILED tests/test_i3a_json.py::test_missing_source_is_json_1_kind_source - As...
FAILED tests/test_i3a_json.py::test_success_json_is_pure_and_compare_is_skipped
FAILED tests/test_i3b_taxonomy.py::test_kind_source_maps_to_1 - AssertionErro...
FAILED tests/test_i3b_taxonomy.py::test_kind_manifest_maps_to_1 - AssertionEr...
FAILED tests/test_i3b_taxonomy.py::test_kind_sample_maps_to_1 - AssertionErro...
FAILED tests/test_i4a_history.py::test_store_is_created_on_first_run - Assert...
FAILED tests/test_i4a_history.py::test_run_writes_a_row_on_pass - AssertionEr...
FAILED tests/test_i4a_history.py::test_run_writes_a_row_on_error_with_the_kind
FAILED tests/test_i4a_history.py::test_no_source_run_still_writes_a_row - Ass...
FAILED tests/test_i4a_history.py::test_json_envelope_reports_the_written_row
FAILED tests/test_i4a_history.py::test_corrupt_store_warns_but_does_not_fail_a_clean_run
FAILED tests/test_i4a_history.py::test_json_reports_a_failed_history_write_without_changing_exit
FAILED tests/test_i4a_history.py::test_unwritable_state_dir_warns_but_does_not_fail_a_clean_run
FAILED tests/test_i4c_retention.py::test_retention_keeps_the_newest_1000_rows
FAILED tests/test_i5a_cron.py::test_cron_line_uses_an_absolute_binary - Asser...
FAILED tests/test_i7b_reconciliation.py::test_fake_restic_failures_exit_1_and_speak_restic_words[fail_restore]
FAILED tests/test_i7b_reconciliation.py::test_fake_restic_failures_exit_1_and_speak_restic_words[no_such_repo]
FAILED tests/test_i7b_reconciliation.py::test_fake_restic_failures_exit_1_and_speak_restic_words[wrong_password]
FAILED tests/test_i7b_reconciliation.py::test_restore_failure_teaches_with_restic_own_sentence
FAILED tests/test_i7b_reconciliation.py::test_source_walk_prunes_exactly_what_restic_pruned
ERROR tests/test_i2_compare.py::test_identical_tree_is_zero_diffs - OSError: ...
ERROR tests/test_i2_compare.py::test_single_byte_change_is_exit_2_and_names_the_file
ERROR tests/test_i2_compare.py::test_size_change_is_exit_2 - OSError: [WinErr...
ERROR tests/test_i2_compare.py::test_all_offenders_are_named - OSError: [WinE...
ERROR tests/test_i2_compare.py::test_symlink_target_difference_is_exit_2 - OS...
ERROR tests/test_i2_compare.py::test_excluded_path_differing_is_still_zero - ...
ERROR tests/test_i2_compare.py::test_excludes_are_passed_to_restic - OSError:...
ERROR tests/test_i2_compare.py::test_no_source_flag_skips_compare_and_returns_zero
ERROR tests/test_i2_compare.py::test_strict_promotes_an_empty_directory_warning_to_exit_2
ERROR tests/test_i2_compare.py::test_four_exit_codes_in_one_cron_style_run - ...
ERROR tests/test_i2_compare.py::test_source_is_never_written_to - OSError: [W...
ERROR tests/test_i2_compare.py::test_compare_json_reports_offenders_and_both_digests
ERROR tests/test_i3a_json.py::test_mismatch_json_is_pure_and_is_not_an_error_object
ERROR tests/test_i3a_json.py::test_every_mode_shares_the_top_level_keys - OSE...
ERROR tests/test_i3c_contract.py::test_schema_and_contract_keys_in_every_mode
ERROR tests/test_i3c_contract.py::test_all_four_exit_codes_in_json_mode - OSE...
ERROR tests/test_i4a_history.py::test_run_writes_a_row_on_mismatch - OSError:...
ERROR tests/test_i4c_retention.py::test_row_matches_the_envelope_for_all_four_states
ERROR tests/test_i5b_demo.py::test_demo_line_shape_end_to_end - OSError: [Win...
ERROR tests/test_i5b_demo.py::test_demo_line_reports_diffs_with_the_same_shape
