From 12116bcf1ef8f3f071c779d4fd8f6ef50a0506cd Mon Sep 17 00:00:00 2001 From: Oliver Kurth Date: Thu, 5 May 2022 18:58:29 +0000 Subject: [PATCH] improve conflict tests --- pytests/tests/test_conflict.py | 5 ++++- pytests/tests/test_skip_md.py | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pytests/tests/test_conflict.py b/pytests/tests/test_conflict.py index f8ca752f..c779fbaf 100644 --- a/pytests/tests/test_conflict.py +++ b/pytests/tests/test_conflict.py @@ -12,7 +12,7 @@ pkg1 = "tdnf-conflict-file1" -@pytest.fixture(scope='module', autouse=True) +@pytest.fixture(scope='function', autouse=True) def setup_test(utils): yield teardown_test(utils) @@ -31,9 +31,12 @@ def test_install_conflict_file(utils): ret = utils.run(['tdnf', 'install', '-y', '--nogpgcheck', pkg1]) print(ret) assert(ret['retval'] == 1525) + assert(not utils.check_package(pkg1)) def test_install_conflict_file_atonce(utils): ret = utils.run(['tdnf', 'install', '-y', '--nogpgcheck', pkg0, pkg1]) print(ret) assert(ret['retval'] == 1525) + assert(not utils.check_package(pkg0)) + assert(not utils.check_package(pkg1)) diff --git a/pytests/tests/test_skip_md.py b/pytests/tests/test_skip_md.py index 18def5b2..b8442c35 100644 --- a/pytests/tests/test_skip_md.py +++ b/pytests/tests/test_skip_md.py @@ -93,6 +93,7 @@ def test_install_conflict_file(utils): ret = utils.run(['tdnf', '--repoid={}'.format(REPOID), 'install', '-y', '--nogpgcheck', pkg1]) print(ret) assert(ret['retval'] == 1525) + assert(not utils.check_package(pkg1)) def test_install_conflict_file_atonce(utils): @@ -102,3 +103,5 @@ def test_install_conflict_file_atonce(utils): ret = utils.run(['tdnf', '--repoid={}'.format(REPOID), 'install', '-y', '--nogpgcheck', pkg0, pkg1]) print(ret) assert(ret['retval'] == 1525) + assert(not utils.check_package(pkg0)) + assert(not utils.check_package(pkg1))