@pytest.mark.skipif(attic is None, reason='cannot find an attic install')
def test_convert_segments(tmpdir, attic_repo, inplace):
    # check should fail because of magic number
    assert not repo_valid(tmpdir)
    repository = AtticRepositoryUpgrader(str(tmpdir), create=False)
    with repository:
        segments = [filename for i, filename in repository.io.segment_iterator()]
    repository.convert_segments(segments, dryrun=False, inplace=inplace)
    repository.convert_cache(dryrun=False)
    assert repo_valid(tmpdir)
test segment conversion
dataset/ETHPy150Open borgbackup/borg/borg/testsuite/upgrader.py/test_convert_segments