Exemple #1
0
def test_bc_not_supported_option(monkeypatch, dummy_site):
    with pytest.raises(SystemExit):
        BanCommit('p', 'c', '--badoption')

    opts = OptionSet(Option.flag('new', spec='>=2.6'))
    s = dummy_site(lambda x: x, '2.5.0')

    monkeypatch.setattr(BanCommit, '_BanCommit__options', opts)
    bc = BanCommit('p', 'c', '--new')

    with pytest.raises(NotImplementedError):
        bc.execute_on(s)
Exemple #2
0
def test_bc_not_supported(dummy_site):
    s = dummy_site(lambda x: [x], '2.4.0')
    lp = BanCommit('p', 'c')

    with pytest.raises(NotImplementedError):
        lp.execute_on(s)