commit: dc8debaf1fac0b0aa9b296ba15b421b6ca39b6c5 Author: David Denoncin <ddenoncin <AT> gmail <DOT> com> AuthorDate: Tue Mar 2 14:02:19 2021 +0000 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> CommitDate: Fri Mar 5 03:20:52 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc8debaf
dev-python/pytest-salt: bug fix When pytest-salt is involved in other package's testing suite, it can cause the corresponding package suite to fail. Closes:https://bugs.gentoo.org/740400 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: David Denoncin <ddenoncin <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/19735 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> .../pytest-salt/files/pytest-salt-2020.1.27-r2.patch | 14 ++++++++++++++ ...2020.1.27-r1.ebuild => pytest-salt-2020.1.27-r2.ebuild} | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/dev-python/pytest-salt/files/pytest-salt-2020.1.27-r2.patch b/dev-python/pytest-salt/files/pytest-salt-2020.1.27-r2.patch new file mode 100644 index 00000000000..35dca262478 --- /dev/null +++ b/dev-python/pytest-salt/files/pytest-salt-2020.1.27-r2.patch @@ -0,0 +1,14 @@ +Fixes a Doctestitem has no attribute 'fixturenames' +Fix by David Denoncin based on https://github.com/saltstack/pytest-salt/issues/48 + +--- a/pytestsalt/fixtures/daemons.py 2021-03-02 15:19:40.500254583 +0100 ++++ b/pytestsalt/fixtures/daemons.py 2021-03-02 15:20:40.706920871 +0100 +@@ -1658,7 +1658,6 @@ + Fixtures injection based on markers + ''' + for fixture in ('salt_master', 'salt_minion', 'salt_call', 'salt', 'salt_key', 'salt_run'): +- if fixture in item.fixturenames: +- after_start_fixture = '{}_after_start'.format(fixture) ++ if fixture in getattr(item, 'fixturenames', ()): + if after_start_fixture not in item.fixturenames: + item.fixturenames.append(after_start_fixture) diff --git a/dev-python/pytest-salt/pytest-salt-2020.1.27-r1.ebuild b/dev-python/pytest-salt/pytest-salt-2020.1.27-r2.ebuild similarity index 94% rename from dev-python/pytest-salt/pytest-salt-2020.1.27-r1.ebuild rename to dev-python/pytest-salt/pytest-salt-2020.1.27-r2.ebuild index 65b1f4a6405..f3d2b483cbd 100644 --- a/dev-python/pytest-salt/pytest-salt-2020.1.27-r1.ebuild +++ b/dev-python/pytest-salt/pytest-salt-2020.1.27-r2.ebuild @@ -28,6 +28,10 @@ RDEPEND=" # test? ( app-admin/salt[${PYTHON_USEDEP}] ) #" +PATCHES=( + "${FILESDIR}/${PN}-2020.1.27-r2.patch" +) + # tests need network access RESTRICT="test"
