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