From 6821e16a483cf80deff8df34aad4a0fdec48e12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 28 May 2018 17:57:20 +0200 Subject: [PATCH 1/4] Paralellize the integration tests This is an attempt to fix https://github.com/fedora-python/taskotron-python-versions/issues/45 It does the following: * uses pytest-xdist to paralellize the tests (3 workers) * utilizes custom scheduler that splits the tests according to the fixture name * this is needed not to use 1 fixture on multiple workers see https://github.com/pytest-dev/pytest-xdist/issues/18 * use parametrize an all integration tests to enable our hackish scheduler * mock now creates the roots in pwd (not to pollute the filesystem on /) * note that the roots can take several GBs --- .gitignore | 1 + mock.cfg | 3 +- test/integration/conftest.py | 18 ++++++ test/integration/test_integration.py | 88 ++++++++++++++++++++-------- tox.ini | 5 +- 5 files changed, 86 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index d85a83a..afc838b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ __pycache__ /artifacts-*/ /build/ /dist/ +/mockroots/ /.tox/ /.eggs/ .cache diff --git a/mock.cfg b/mock.cfg index e9fc604..4cbc818 100644 --- a/mock.cfg +++ b/mock.cfg @@ -4,4 +4,5 @@ config_opts['chroot_setup_cmd'] = 'install ansible dnf' config_opts['use_host_resolv'] = True config_opts['rpmbuild_networking'] = True config_opts['use_nspawn'] = False -config_opts['root'] = 'fedora-27-x86_64-taskotron' +config_opts['root'] = 'taskotron-python-versions-master' +config_opts['plugin_conf']['root_cache_opts']['dir'] = "%(cache_topdir)s/taskotron-python-versions/root_cache/" diff --git a/test/integration/conftest.py b/test/integration/conftest.py index 7afeabb..24298f1 100644 --- a/test/integration/conftest.py +++ b/test/integration/conftest.py @@ -1,4 +1,22 @@ +from xdist.scheduler import LoadScopeScheduling + + def pytest_addoption(parser): parser.addoption('--fake', action='store_true', default=False, help='don\'t run the code, reuse the result from ' 'last tests') + + +class FixtureScheduling(LoadScopeScheduling): + """Split by [] value. This is very hackish and might blow up any time! + See https://github.com/pytest-dev/pytest-xdist/issues/18 + """ + def _split_scope(self, nodeid): + if '[' in nodeid: + parameters = nodeid.rsplit('[')[-1].replace(']', '') + return parameters.split('-')[0] + return None + + +def pytest_xdist_make_scheduler(log, config): + return FixtureScheduling(config, log) diff --git a/test/integration/test_integration.py b/test/integration/test_integration.py index 15d486d..8a9053a 100644 --- a/test/integration/test_integration.py +++ b/test/integration/test_integration.py @@ -1,6 +1,7 @@ from collections import namedtuple import contextlib import glob +import os import pprint import shutil import subprocess @@ -16,14 +17,27 @@ class MockEnv: - '''Use this to work with mock. Mutliple instances are not safe.''' + '''Use this to work with mock. Mutliple concurrent instances are safe.''' mock = ['mock', '-r', './mock.cfg'] - def __init__(self): + def __init__(self, worker_id): + self.worker_id = worker_id self._run(['--init'], check=True) + @property + def root(self): + return 'taskotron-python-versions-{}'.format(self.worker_id) + + @property + def rootdir(self): + return os.path.join(os.path.abspath('.'), 'mockroots', self.root) + def _run(self, what, **kwargs): - return subprocess.run(self.mock + what, **kwargs) + command = list(self.mock) # needs a copy not to change in place + command.append('--config-opts=root={}'.format(self.root)) + command.append('--rootdir={}'.format(self.rootdir)) + command.extend(what) + return subprocess.run(command, **kwargs) def copy_in(self, files): self._run(['--copyin'] + files + ['/'], check=True) @@ -52,12 +66,12 @@ def copy_out(self, directory, target, *, clean_target=False): @pytest.fixture(scope="session") -def mock(request): +def mock(worker_id, request): '''Setup a mock we can run Ansible tasks in under root''' if request.config.getoption('--fake'): - mockenv = FakeMockEnv() + mockenv = FakeMockEnv(worker_id) else: - mockenv = MockEnv() + mockenv = MockEnv(worker_id) files = ['taskotron_python_versions'] + glob.glob('*.py') + ['tests.yml'] mockenv.copy_in(files) yield mockenv @@ -187,8 +201,10 @@ def test_two_three_passed(results, request): assert results['dist.python-versions.two_three'].outcome == 'PASSED' -def test_two_three_failed(tracer): - assert tracer['dist.python-versions.two_three'].outcome == 'FAILED' +@pytest.mark.parametrize('results', ('tracer',)) +def test_two_three_failed(results, request): + results = request.getfixturevalue(results) + assert results['dist.python-versions.two_three'].outcome == 'FAILED' @pytest.mark.parametrize('results', ('tracer', 'copr', 'admesh')) @@ -207,8 +223,10 @@ def test_artifact_is_the_same(results, task, request): results['dist.python-versions.' + task].artifact) -def test_artifact_contains_two_three_and_looks_as_expected(tracer): - result = tracer['dist.python-versions.two_three'] +@pytest.mark.parametrize('results', ('tracer',)) +def test_artifact_contains_two_three_and_looks_as_expected(results, request): + results = request.getfixturevalue(results) + result = results['dist.python-versions.two_three'] with open(result.artifact) as f: artifact = f.read() @@ -233,8 +251,11 @@ def test_naming_scheme_failed(results, request): assert results['dist.python-versions.naming_scheme'].outcome == 'FAILED' -def test_artifact_contains_naming_scheme_and_looks_as_expected(copr): - result = copr['dist.python-versions.naming_scheme'] +@pytest.mark.parametrize('results', ('copr',)) +def test_artifact_contains_naming_scheme_and_looks_as_expected(results, + request): + results = request.getfixturevalue(results) + result = results['dist.python-versions.naming_scheme'] with open(result.artifact) as f: artifact = f.read() @@ -258,9 +279,11 @@ def test_requires_naming_scheme_failed(results, request): assert task_result.outcome == 'FAILED' +@pytest.mark.parametrize('results', ('tracer',)) def test_artifact_contains_requires_naming_scheme_and_looks_as_expected( - tracer): - result = tracer['dist.python-versions.requires_naming_scheme'] + results, request): + results = request.getfixturevalue(results) + result = results['dist.python-versions.requires_naming_scheme'] with open(result.artifact) as f: artifact = f.read() @@ -281,8 +304,10 @@ def test_artifact_contains_requires_naming_scheme_and_looks_as_expected( """).strip() in artifact.strip() -def test_requires_naming_scheme_contains_python(yum): - result = yum['dist.python-versions.requires_naming_scheme'] +@pytest.mark.parametrize('results', ('yum',)) +def test_requires_naming_scheme_contains_python(results, request): + results = request.getfixturevalue(results) + result = results['dist.python-versions.requires_naming_scheme'] with open(result.artifact) as f: artifact = f.read() @@ -306,9 +331,11 @@ def test_executables_failed(results, request): assert task_result.outcome == 'FAILED' +@pytest.mark.parametrize('results', ('docutils',)) def test_artifact_contains_executables_and_looks_as_expected( - docutils): - result = docutils['dist.python-versions.executables'] + results, request): + results = request.getfixturevalue(results) + result = results['dist.python-versions.executables'] with open(result.artifact) as f: artifact = f.read() @@ -352,9 +379,11 @@ def test_unvesioned_shebangs_failed(results, request): assert result.outcome == 'FAILED' +@pytest.mark.parametrize('results', ('tracer',)) def test_artifact_contains_unversioned_shebangs_and_looks_as_expected( - tracer): - result = tracer['dist.python-versions.unversioned_shebangs'] + results, request): + results = request.getfixturevalue(results) + result = results['dist.python-versions.unversioned_shebangs'] with open(result.artifact) as f: artifact = f.read() @@ -378,9 +407,11 @@ def test_unvesioned_shebangs_mangled_failed(results, request): assert result.outcome == 'FAILED' +@pytest.mark.parametrize('results', ('bucky',)) def test_artifact_contains_mangled_unversioned_shebangs_and_looks_as_expected( - bucky): - result = bucky['dist.python-versions.unversioned_shebangs'] + results, request): + results = request.getfixturevalue(results) + result = results['dist.python-versions.unversioned_shebangs'] with open(result.artifact) as f: artifact = f.read() @@ -420,15 +451,17 @@ def test_py3_support_failed(results, request): assert task_result.outcome == 'FAILED' +@pytest.mark.parametrize('results', ('bucky',)) def test_artifact_contains_py3_support_and_looks_as_expected( - bucky): + results, request): """Test that py3_support check fails if the package is mispackaged. NOTE: The test will start to fail as soon as python-bucky gets ported to Python 3 and its Bugzilla gets closed. See https://bugzilla.redhat.com/show_bug.cgi?id=1367012 """ - result = bucky['dist.python-versions.py3_support'] + results = request.getfixturevalue(results) + result = results['dist.python-versions.py3_support'] with open(result.artifact) as f: artifact = f.read() @@ -459,8 +492,11 @@ def test_python_usage_failed(results, request): assert task_result.outcome == 'FAILED' -def test_artifact_contains_python_usage_and_looks_as_expected(jsonrpc): - result = jsonrpc['dist.python-versions.python_usage'] +@pytest.mark.parametrize('results', ('jsonrpc',)) +def test_artifact_contains_python_usage_and_looks_as_expected(results, + request): + results = request.getfixturevalue(results) + result = results['dist.python-versions.python_usage'] with open(result.artifact) as f: artifact = f.read() diff --git a/tox.ini b/tox.ini index e463d0c..8e99374 100644 --- a/tox.ini +++ b/tox.ini @@ -14,13 +14,14 @@ sitepackages = True [testenv:integration] deps = pytest + pytest-xdist pyyaml basepython = python3 -commands = python -m pytest -v {posargs} test/integration +commands = python -m pytest -v -n3 {posargs} test/integration sitepackages = False [testenv:style] deps = flake8 basepython = python3 -commands = python -m flake8 . --ignore=E402 +commands = python -m flake8 . --ignore=E402 --exclude=.git,__pycache__,.tox,.eggs,dist,build,mockroots sitepackages = False From 7207e319b28535fd809e7644fe571b568319efcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 28 May 2018 18:09:45 +0200 Subject: [PATCH 2/4] DRY in integration tests --- test/integration/test_integration.py | 70 ++++++++++++++-------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/test/integration/test_integration.py b/test/integration/test_integration.py index 8a9053a..84694f5 100644 --- a/test/integration/test_integration.py +++ b/test/integration/test_integration.py @@ -180,10 +180,12 @@ def results(request): jsonrpc = fixtures_factory('_jsonrpc') -@pytest.mark.parametrize('results', ('eric', 'six', 'admesh', 'tracer', - 'copr', 'epub', 'twine', 'yum', - 'vdirsyncer', 'docutils', 'nodejs', - 'bucky', 'jsonrpc')) +def parametrize(*fixtrues): + return pytest.mark.parametrize('results', fixtrues) + + +@parametrize('eric', 'six', 'admesh', 'tracer', 'copr', 'epub', 'twine', 'yum', + 'vdirsyncer', 'docutils', 'nodejs', 'bucky', 'jsonrpc') def test_number_of_results(results, request): # getting a fixture by name # https://github.com/pytest-dev/pytest/issues/349#issuecomment-112203541 @@ -193,21 +195,19 @@ def test_number_of_results(results, request): assert len(results) == 8 -@pytest.mark.parametrize('results', ('eric', 'six', 'admesh', - 'copr', 'epub', 'twine', - 'bucky')) +@parametrize('eric', 'six', 'admesh', 'copr', 'epub', 'twine', 'bucky') def test_two_three_passed(results, request): results = request.getfixturevalue(results) assert results['dist.python-versions.two_three'].outcome == 'PASSED' -@pytest.mark.parametrize('results', ('tracer',)) +@parametrize('tracer') def test_two_three_failed(results, request): results = request.getfixturevalue(results) assert results['dist.python-versions.two_three'].outcome == 'FAILED' -@pytest.mark.parametrize('results', ('tracer', 'copr', 'admesh')) +@parametrize('tracer', 'copr', 'admesh') def test_one_failed_result_is_total_failed(results, request): results = request.getfixturevalue(results) assert results['dist.python-versions'].outcome == 'FAILED' @@ -223,7 +223,7 @@ def test_artifact_is_the_same(results, task, request): results['dist.python-versions.' + task].artifact) -@pytest.mark.parametrize('results', ('tracer',)) +@parametrize('tracer') def test_artifact_contains_two_three_and_looks_as_expected(results, request): results = request.getfixturevalue(results) result = results['dist.python-versions.two_three'] @@ -238,20 +238,19 @@ def test_artifact_contains_two_three_and_looks_as_expected(results, request): ''').strip().format(result.item) in artifact.strip() -@pytest.mark.parametrize('results', ('eric', 'epub', 'twine', 'vdirsyncer', - 'bucky')) +@parametrize('eric', 'epub', 'twine', 'vdirsyncer', 'bucky') def test_naming_scheme_passed(results, request): results = request.getfixturevalue(results) assert results['dist.python-versions.naming_scheme'].outcome == 'PASSED' -@pytest.mark.parametrize('results', ('copr', 'six', 'admesh')) +@parametrize('copr', 'six', 'admesh') def test_naming_scheme_failed(results, request): results = request.getfixturevalue(results) assert results['dist.python-versions.naming_scheme'].outcome == 'FAILED' -@pytest.mark.parametrize('results', ('copr',)) +@parametrize('copr') def test_artifact_contains_naming_scheme_and_looks_as_expected(results, request): results = request.getfixturevalue(results) @@ -265,21 +264,21 @@ def test_artifact_contains_naming_scheme_and_looks_as_expected(results, """).strip().format(result.item) in artifact.strip() -@pytest.mark.parametrize('results', ('eric', 'twine', 'six')) +@parametrize('eric', 'twine', 'six') def test_requires_naming_scheme_passed(results, request): results = request.getfixturevalue(results) task_result = results['dist.python-versions.requires_naming_scheme'] assert task_result.outcome == 'PASSED' -@pytest.mark.parametrize('results', ('admesh', 'copr')) +@parametrize('admesh', 'copr') def test_requires_naming_scheme_failed(results, request): results = request.getfixturevalue(results) task_result = results['dist.python-versions.requires_naming_scheme'] assert task_result.outcome == 'FAILED' -@pytest.mark.parametrize('results', ('tracer',)) +@parametrize('tracer') def test_artifact_contains_requires_naming_scheme_and_looks_as_expected( results, request): results = request.getfixturevalue(results) @@ -304,7 +303,7 @@ def test_artifact_contains_requires_naming_scheme_and_looks_as_expected( """).strip() in artifact.strip() -@pytest.mark.parametrize('results', ('yum',)) +@parametrize('yum') def test_requires_naming_scheme_contains_python(results, request): results = request.getfixturevalue(results) result = results['dist.python-versions.requires_naming_scheme'] @@ -316,22 +315,22 @@ def test_requires_naming_scheme_contains_python(results, request): assert 'python (python2 is available)' in artifact.strip() -@pytest.mark.parametrize('results', ('eric', 'six', 'admesh', 'tracer', - 'copr', 'epub', 'twine', 'bucky')) +@parametrize('eric', 'six', 'admesh', 'tracer', + 'copr', 'epub', 'twine', 'bucky') def test_executables_passed(results, request): results = request.getfixturevalue(results) task_result = results['dist.python-versions.executables'] assert task_result.outcome == 'PASSED' -@pytest.mark.parametrize('results', ('docutils',)) +@parametrize('docutils') def test_executables_failed(results, request): results = request.getfixturevalue(results) task_result = results['dist.python-versions.executables'] assert task_result.outcome == 'FAILED' -@pytest.mark.parametrize('results', ('docutils',)) +@parametrize('docutils') def test_artifact_contains_executables_and_looks_as_expected( results, request): results = request.getfixturevalue(results) @@ -364,22 +363,21 @@ def test_artifact_contains_executables_and_looks_as_expected( """).strip() in artifact.strip() -@pytest.mark.parametrize('results', ('eric', 'six', 'admesh', 'copr', - 'epub', 'twine', 'nodejs')) +@parametrize('eric', 'six', 'admesh', 'copr', 'epub', 'twine', 'nodejs') def test_unvesioned_shebangs_passed(results, request): results = request.getfixturevalue(results) result = results['dist.python-versions.unversioned_shebangs'] assert result.outcome == 'PASSED' -@pytest.mark.parametrize('results', ('yum', 'tracer', 'bucky')) +@parametrize('yum', 'tracer', 'bucky') def test_unvesioned_shebangs_failed(results, request): results = request.getfixturevalue(results) result = results['dist.python-versions.unversioned_shebangs'] assert result.outcome == 'FAILED' -@pytest.mark.parametrize('results', ('tracer',)) +@parametrize('tracer') def test_artifact_contains_unversioned_shebangs_and_looks_as_expected( results, request): results = request.getfixturevalue(results) @@ -400,14 +398,14 @@ def test_artifact_contains_unversioned_shebangs_and_looks_as_expected( """).strip() in artifact.strip() -@pytest.mark.parametrize('results', ('bucky',)) +@parametrize('bucky') def test_unvesioned_shebangs_mangled_failed(results, request): results = request.getfixturevalue(results) result = results['dist.python-versions.unversioned_shebangs'] assert result.outcome == 'FAILED' -@pytest.mark.parametrize('results', ('bucky',)) +@parametrize('bucky') def test_artifact_contains_mangled_unversioned_shebangs_and_looks_as_expected( results, request): results = request.getfixturevalue(results) @@ -436,22 +434,22 @@ def test_artifact_contains_mangled_unversioned_shebangs_and_looks_as_expected( """).strip() in artifact.strip() -@pytest.mark.parametrize('results', ('eric', 'six', 'admesh', 'tracer', - 'copr', 'epub', 'twine', 'docutils')) +@parametrize('eric', 'six', 'admesh', 'tracer', + 'copr', 'epub', 'twine', 'docutils') def test_py3_support_passed(results, request): results = request.getfixturevalue(results) task_result = results['dist.python-versions.py3_support'] assert task_result.outcome == 'PASSED' -@pytest.mark.parametrize('results', ('bucky',)) +@parametrize('bucky') def test_py3_support_failed(results, request): results = request.getfixturevalue(results) task_result = results['dist.python-versions.py3_support'] assert task_result.outcome == 'FAILED' -@pytest.mark.parametrize('results', ('bucky',)) +@parametrize('bucky') def test_artifact_contains_py3_support_and_looks_as_expected( results, request): """Test that py3_support check fails if the package is mispackaged. @@ -477,22 +475,22 @@ def test_artifact_contains_py3_support_and_looks_as_expected( """).strip() in artifact.strip() -@pytest.mark.parametrize('results', ('eric', 'six', 'admesh', 'tracer', - 'copr', 'epub', 'twine', 'docutils')) +@parametrize('eric', 'six', 'admesh', 'tracer', + 'copr', 'epub', 'twine', 'docutils') def test_python_usage_passed(results, request): results = request.getfixturevalue(results) task_result = results['dist.python-versions.python_usage'] assert task_result.outcome == 'PASSED' -@pytest.mark.parametrize('results', ('jsonrpc',)) +@parametrize('jsonrpc') def test_python_usage_failed(results, request): results = request.getfixturevalue(results) task_result = results['dist.python-versions.python_usage'] assert task_result.outcome == 'FAILED' -@pytest.mark.parametrize('results', ('jsonrpc',)) +@parametrize('jsonrpc') def test_artifact_contains_python_usage_and_looks_as_expected(results, request): results = request.getfixturevalue(results) From e75ed99911cd078552104bcca45befc8048f8049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 28 May 2018 18:13:19 +0200 Subject: [PATCH 3/4] Use Fedora 28 in mock --- mock.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mock.cfg b/mock.cfg index 4cbc818..6ad302d 100644 --- a/mock.cfg +++ b/mock.cfg @@ -1,4 +1,4 @@ -include('/etc/mock/fedora-27-x86_64.cfg') +include('/etc/mock/fedora-28-x86_64.cfg') config_opts['chroot_setup_cmd'] = 'install ansible dnf' config_opts['use_host_resolv'] = True From 2e717e6475dac8fffa073e9aeaf347539a3a0ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 29 May 2018 14:49:51 +0200 Subject: [PATCH 4/4] Tests: Replace bucky with pycallgraph as bucky got finally ported --- test/integration/test_integration.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/test/integration/test_integration.py b/test/integration/test_integration.py index 84694f5..4039c5f 100644 --- a/test/integration/test_integration.py +++ b/test/integration/test_integration.py @@ -173,8 +173,8 @@ def results(request): _nodejs = fixtures_factory('nodejs-semver-5.1.1-2.fc26') nodejs = fixtures_factory('_nodejs') -_bucky = fixtures_factory('python-bucky-2.2.2-9.fc28') -bucky = fixtures_factory('_bucky') +_pycallgraph = fixtures_factory('python-pycallgraph-0.5.1-13.fc28') +pycallgraph = fixtures_factory('_pycallgraph') _jsonrpc = fixtures_factory('jsonrpc-glib-3.27.4-1.fc28') jsonrpc = fixtures_factory('_jsonrpc') @@ -185,7 +185,7 @@ def parametrize(*fixtrues): @parametrize('eric', 'six', 'admesh', 'tracer', 'copr', 'epub', 'twine', 'yum', - 'vdirsyncer', 'docutils', 'nodejs', 'bucky', 'jsonrpc') + 'vdirsyncer', 'docutils', 'nodejs', 'pycallgraph', 'jsonrpc') def test_number_of_results(results, request): # getting a fixture by name # https://github.com/pytest-dev/pytest/issues/349#issuecomment-112203541 @@ -195,7 +195,7 @@ def test_number_of_results(results, request): assert len(results) == 8 -@parametrize('eric', 'six', 'admesh', 'copr', 'epub', 'twine', 'bucky') +@parametrize('eric', 'six', 'admesh', 'copr', 'epub', 'twine', 'pycallgraph') def test_two_three_passed(results, request): results = request.getfixturevalue(results) assert results['dist.python-versions.two_three'].outcome == 'PASSED' @@ -238,7 +238,7 @@ def test_artifact_contains_two_three_and_looks_as_expected(results, request): ''').strip().format(result.item) in artifact.strip() -@parametrize('eric', 'epub', 'twine', 'vdirsyncer', 'bucky') +@parametrize('eric', 'epub', 'twine', 'vdirsyncer', 'pycallgraph') def test_naming_scheme_passed(results, request): results = request.getfixturevalue(results) assert results['dist.python-versions.naming_scheme'].outcome == 'PASSED' @@ -316,7 +316,7 @@ def test_requires_naming_scheme_contains_python(results, request): @parametrize('eric', 'six', 'admesh', 'tracer', - 'copr', 'epub', 'twine', 'bucky') + 'copr', 'epub', 'twine', 'pycallgraph') def test_executables_passed(results, request): results = request.getfixturevalue(results) task_result = results['dist.python-versions.executables'] @@ -370,7 +370,7 @@ def test_unvesioned_shebangs_passed(results, request): assert result.outcome == 'PASSED' -@parametrize('yum', 'tracer', 'bucky') +@parametrize('yum', 'tracer', 'pycallgraph') def test_unvesioned_shebangs_failed(results, request): results = request.getfixturevalue(results) result = results['dist.python-versions.unversioned_shebangs'] @@ -398,14 +398,14 @@ def test_artifact_contains_unversioned_shebangs_and_looks_as_expected( """).strip() in artifact.strip() -@parametrize('bucky') +@parametrize('pycallgraph') def test_unvesioned_shebangs_mangled_failed(results, request): results = request.getfixturevalue(results) result = results['dist.python-versions.unversioned_shebangs'] assert result.outcome == 'FAILED' -@parametrize('bucky') +@parametrize('pycallgraph') def test_artifact_contains_mangled_unversioned_shebangs_and_looks_as_expected( results, request): results = request.getfixturevalue(results) @@ -442,21 +442,21 @@ def test_py3_support_passed(results, request): assert task_result.outcome == 'PASSED' -@parametrize('bucky') +@parametrize('pycallgraph') def test_py3_support_failed(results, request): results = request.getfixturevalue(results) task_result = results['dist.python-versions.py3_support'] assert task_result.outcome == 'FAILED' -@parametrize('bucky') +@parametrize('pycallgraph') def test_artifact_contains_py3_support_and_looks_as_expected( results, request): """Test that py3_support check fails if the package is mispackaged. - NOTE: The test will start to fail as soon as python-bucky + NOTE: The test will start to fail as soon as python-pycallgraph gets ported to Python 3 and its Bugzilla gets closed. - See https://bugzilla.redhat.com/show_bug.cgi?id=1367012 + See https://bugzilla.redhat.com/show_bug.cgi?id=1309383 """ results = request.getfixturevalue(results) result = results['dist.python-versions.py3_support'] @@ -471,7 +471,7 @@ def test_artifact_contains_py3_support_and_looks_as_expected( Software MUST be packaged for Python 3 if upstream supports it. See the following Bugzilla: - https://bugzilla.redhat.com/show_bug.cgi?id=1367012 + https://bugzilla.redhat.com/show_bug.cgi?id=1309383 """).strip() in artifact.strip()