public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jian Lin" <jlin.gentoo@outlook.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-python/pytest-benchmark/
Date: Mon, 16 Aug 2021 19:04:56 +0000 (UTC)	[thread overview]
Message-ID: <1628906374.03c1950da93401e516371bb0135e4d0e10a26f26.jian@gentoo> (raw)

commit:     03c1950da93401e516371bb0135e4d0e10a26f26
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Aug 14 01:38:34 2021 +0000
Commit:     Jian Lin <jlin.gentoo <AT> outlook <DOT> com>
CommitDate: Sat Aug 14 01:59:34 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=03c1950d

dev-python/pytest-benchmark: bump EAPI, enable py3.10

And fix tests (that was hard...)

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 .../pytest-benchmark/pytest-benchmark-3.4.1.ebuild | 55 +++++++++++-----------
 1 file changed, 27 insertions(+), 28 deletions(-)

diff --git a/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild b/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild
index e342f4803..3cc5d7a49 100644
--- a/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild
+++ b/dev-python/pytest-benchmark/pytest-benchmark-3.4.1.ebuild
@@ -1,11 +1,9 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="7"
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python3_{8..9} )
+EAPI=8
 
+PYTHON_COMPAT=( python3_{8..10} )
 inherit distutils-r1
 
 DESCRIPTION="py.test fixture for benchmarking code "
@@ -19,34 +17,35 @@ LICENSE="BSD-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 
-# during tests import fails because conflict with the already installed files
-# not sure how to fix, it would require setting some python variables but that would
-# probably lead to all other packages being unfindable by the tests
-RESTRICT="test"
+DOCS=( AUTHORS.rst CHANGELOG.rst README.rst )
 
-RDEPEND="
-	dev-python/py-cpuinfo[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	${RDEPEND}
-	test? (
-		dev-python/aspectlib[${PYTHON_USEDEP}]
-		dev-python/elasticsearch-py[${PYTHON_USEDEP}]
-		dev-python/freezegun[${PYTHON_USEDEP}]
-		dev-python/hunter[${PYTHON_USEDEP}]
-		dev-python/pygal[${PYTHON_USEDEP}]
-		dev-python/pygaljs[${PYTHON_USEDEP}]
-		dev-python/pytest-instafail[${PYTHON_USEDEP}]
-		dev-python/pytest-xdist[${PYTHON_USEDEP}]
-	)
-"
+RDEPEND="dev-python/py-cpuinfo[${PYTHON_USEDEP}]"
+BDEPEND="test? (
+	dev-python/aspectlib[${PYTHON_USEDEP}]
+	dev-python/freezegun[${PYTHON_USEDEP}]
+	dev-python/hunter[${PYTHON_USEDEP}]
+	dev-python/pygal[${PYTHON_USEDEP}]
+	dev-python/pygaljs[${PYTHON_USEDEP}]
+	$(python_gen_cond_dep \
+		'dev-python/elasticsearch-py[${PYTHON_USEDEP}]' python3_8 python3_9 )
+)"
 
 distutils_enable_tests pytest
 distutils_enable_sphinx docs dev-python/sphinx-py3doc-enhanced-theme
 
+python_prepare() {
+	if [[ ${EPYTHON} == python3.10 ]]; then
+		rm tests/test_elasticsearch_storage.py || die
+	fi
+}
+
 python_test() {
-	# has to be run in source dir
-	PYTHONPATH="${S}"
-	cd "${S}" || die
-	pytest -vv || die "Tests fail with ${EPYTHON}"
+	local -x PYTHONPATH="${S}/tests:${BUILD_DIR}/lib:${PYTHONPATH}"
+	local epytest_args=(
+		-o markers=benchmark
+		--deselect tests/test_cli.py::test_help
+		--deselect tests/test_cli.py::test_help_compare
+	)
+
+	epytest "${epytest_args[@]}"
 }


             reply	other threads:[~2021-08-16 20:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16 19:04 Jian Lin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-25 13:01 [gentoo-commits] repo/proj/guru:master commit in: dev-python/pytest-benchmark/ Julien Roy
2024-04-15  9:34 Julien Roy
2024-04-13 15:04 Julien Roy
2023-07-25  4:59 Haelwenn Monnier
2022-11-04 14:38 Arthur Zamarin
2022-06-01 11:17 Andrew Ammerlaan
2021-06-15  7:11 Andrew Ammerlaan
2021-05-25 23:07 Haelwenn Monnier
2021-05-06  9:55 Andrew Ammerlaan
2020-09-24 12:17 [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2020-09-24 13:01 ` [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2020-06-09 16:37 Andrew Ammerlaan
2020-03-29 13:21 Andrew Ammerlaan
2020-03-29 13:21 [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2020-03-29 13:21 ` [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1628906374.03c1950da93401e516371bb0135e4d0e10a26f26.jian@gentoo \
    --to=jlin.gentoo@outlook.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox