def test_actions_from_dir_mode2_path_notdigit_fail(monkeypatch): monkeypatch.setattr('koneko.files.filter_history', lambda x: 'sentinel') assert picker.actions_from_dir(KONEKODIR / 'notdigit', ['2']) == 'sentinel'
def test_actions_from_dir_mode2_individual_fail(monkeypatch): monkeypatch.setattr('koneko.files.filter_history', lambda x: 'sentinel') assert picker.actions_from_dir(KONEKODIR / '123' / 'individual', ['2']) == 'sentinel'
def test_actions_from_dir_mode2_success(monkeypatch): assert picker.actions_from_dir(KONEKODIR / '123', ['2']) == ['individual']
def test_actions_from_dir_filter_active(monkeypatch): monkeypatch.setattr('koneko.picker.try_filter_dir', lambda x: 'sentinel') assert picker.actions_from_dir(KONEKODIR, 'modes_is_not_none') == 'sentinel'
def test_actions_from_dir_filter_inactive_empty(monkeypatch): monkeypatch.setattr('koneko.files.filter_history', lambda x: []) assert picker.actions_from_dir('not_konekodir', []) == [EMPTY_WARNING]
def test_actions_from_dir_filter_inactive(monkeypatch): monkeypatch.setattr('koneko.files.filter_history', lambda x: 'sentinel') assert picker.actions_from_dir('not_konekodir', []) == 'sentinel'