From 6c25b33b9e9b380c001a53d2927ad0f40375cdd4 Mon Sep 17 00:00:00 2001 From: Pablo Santiago Blum de Aguiar Date: Sun, 31 Jan 2016 19:42:59 -0200 Subject: [PATCH] #N/A Add parameter and skip a test for apt_get rule --- tests/rules/test_apt_get.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/rules/test_apt_get.py b/tests/rules/test_apt_get.py index f0362795..2f2520fc 100644 --- a/tests/rules/test_apt_get.py +++ b/tests/rules/test_apt_get.py @@ -29,7 +29,11 @@ def test_match_mocked(cmdnf_mock, command, return_value): assert get_packages.called +# python-commandnotfound is available in ubuntu 14.04+ +@pytest.mark.skipif(not getattr(apt_get, 'enabled_by_default', True), + reason='Skip if python-commandnotfound is not available') @pytest.mark.parametrize('command', [ + Command(script='a_bad_cmd', stderr='a_bad_cmd: command not found'), Command(script='vim', stderr=''), Command()]) def test_not_match(command): assert not match(command)