def test_process_broken_link(mocker, caplog):
    shutil.rmtree('output', ignore_errors=True)
    mocker.patch.object(Phockup, 'check_directories')
    mocker.patch.object(Phockup, 'walk_directory')
    with caplog.at_level(logging.WARNING):
        Phockup('input', 'output').process_file('input/not_a_file.jpg')
    assert ('skipped, no such file or directory' in caplog.text)
    shutil.rmtree('output', ignore_errors=True)
def test_process_broken_link(mocker, caplog):
    shutil.rmtree('output', ignore_errors=True)
    mocker.patch.object(Phockup, 'check_directories')
    mocker.patch.object(Phockup, 'walk_directory')
    with caplog.at_level(logging.WARNING):
        Phockup('input', 'output').process_file('input/not_a_file.jpg')
    assert ('skipped, no such file or directory' in caplog.text)
    shutil.rmtree('output', ignore_errors=True)