Ejemplo n.º 1
0
def test_add_pkg_error(transaction):
    with raises(TypeError) as excinfo:
        transaction.add_pkg(PKG)
    assert 'must be alpm.Package' in str(excinfo.value)
Ejemplo n.º 2
0
def test_add_pkg_not_satisfied(handle, transaction, package):
    transaction.add_pkg(package)
    with raises(error) as excinfo:
        transaction.prepare()
    assert 'could not satisfy dependencies' in str(excinfo.value)