Esempio n. 1
0
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'
Esempio n. 2
0
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'
Esempio n. 3
0
def test_actions_from_dir_mode2_success(monkeypatch):
    assert picker.actions_from_dir(KONEKODIR / '123', ['2']) == ['individual']
Esempio n. 4
0
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'
Esempio n. 5
0
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]
Esempio n. 6
0
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'