summaryrefslogtreecommitdiff
path: root/dev-python/betamax
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/betamax')
-rw-r--r--dev-python/betamax/Manifest4
-rw-r--r--dev-python/betamax/betamax-0.8.1-r1.ebuild44
-rw-r--r--dev-python/betamax/betamax-0.8.1.ebuild39
-rw-r--r--dev-python/betamax/files/betamax-0.8.1-pytest.patch38
-rw-r--r--dev-python/betamax/files/betamax-0.8.1-tests.patch20
5 files changed, 84 insertions, 61 deletions
diff --git a/dev-python/betamax/Manifest b/dev-python/betamax/Manifest
index a1f3fcc6d5e2..afb3b4b5c8f4 100644
--- a/dev-python/betamax/Manifest
+++ b/dev-python/betamax/Manifest
@@ -1,4 +1,4 @@
-AUX betamax-0.8.1-tests.patch 867 BLAKE2B d161db0b79eff7591bf87cf256a50357e1d82f7eeb0fdf39c27be287c97bf6a536a4e62defd173305ba598f388f2b49d22545443c6fcb589f66988930ae29a55 SHA512 001b26d84e4a02b242ee90b36df0a30c9c4890623191655a8eae5a87e106679197fa8090354b52a72ad07da97666190ebb3a7dcb9b4ffba7b9bea9c18bfed115
+AUX betamax-0.8.1-pytest.patch 1535 BLAKE2B b2a4d97fe2d1fad680e4037613bb3bcbe815902f79e975a768123a7017f53018cae0e18640a10d7fdf3afe59a33ea7ca02c9508f2341955ab9866c3f44411beb SHA512 258bd6729286dc9374829308c23cca73ea640c4597ca8747ebb8281bcf7723bba3dfee5b55cadff0459e8dc4511d85228d37911e981859dd0af55a3753ae9e22
DIST betamax-0.8.1.tar.gz 77526 BLAKE2B 2ce88326c5ef80082908912c4b14f149793c4457c47446ebcabaaffaa6b0ee64528096acc6bdd868fce0fad3d10ad66697cad5dc422c15b324e1cc9ae20eafa6 SHA512 89bfb56cf4004a70ec8c1f2342cfa0e02f850b8ed80b67f8b2b02c1a2093e8ac1cf1b9980354551e9d3a21fadde0d77d717f1559487024941973cd80bd451734
-EBUILD betamax-0.8.1.ebuild 1097 BLAKE2B a8c95c301c5e2c63cf4207e0a769c97ecf6754df11c623800f5526ec5fee909c490fab0536416db86f168a5e96e57b21557002a47f8bf480c8e9029ff1c3d8cf SHA512 c093372f2e2b0c196fb7b257d6bc442a20e9fe76621ee2b8d20402e59cfd77eddbf543d296c872566e4e3bc3b15a64dac5b6dc536423308cf1ffbae964919aee
+EBUILD betamax-0.8.1-r1.ebuild 1270 BLAKE2B 3e5dc824a5bd90ee86a91ceac3a5f90b69d17c2315ea5cb13026aa44d84bf807d6c66adbda54ce09b2233e1e96240319a304368d8b09d554c956b81ef03a6033 SHA512 9f39457a9c912302883437e6a2eba511f4eabb463007d92630292765e343fe700400d9066bf0e36e9d4640eb00c5959c200a69d42ee35d786992a12359c0c645
MISC metadata.xml 313 BLAKE2B 04211b989a66a623cac0e27b3f810fb0b102f334ce917764eacb193711cf7ded5eab1203d4da247ce6082072677c176c36bdb7fc8bf087ce9561874d7a63a6b0 SHA512 e07fa6058392a097412cdb49d86549b3cad79fb720818fd5110a0cad5e145ebd512d71132e25192386924454f850d6422e53db735b4533a6ed6f0d2c33148c7a
diff --git a/dev-python/betamax/betamax-0.8.1-r1.ebuild b/dev-python/betamax/betamax-0.8.1-r1.ebuild
new file mode 100644
index 000000000000..e7791ecd78cc
--- /dev/null
+++ b/dev-python/betamax/betamax-0.8.1-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+DESCRIPTION="python-requests HTTP exchanges recorder"
+HOMEPAGE="
+ https://github.com/betamaxpy/betamax/
+ https://pypi.org/project/betamax/
+"
+SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
+
+RDEPEND="
+ dev-python/requests[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}/${P}-pytest.patch"
+)
+
+EPYTEST_DESELECT=(
+ # Internet
+ tests/integration/test_hooks.py
+ tests/integration/test_placeholders.py
+ tests/integration/test_record_modes.py::TestRecordOnce::test_records_new_interaction
+ tests/integration/test_record_modes.py::TestRecordOnce::test_replays_response_from_cassette
+ tests/integration/test_record_modes.py::TestRecordNewEpisodes
+ tests/integration/test_record_modes.py::TestRecordNewEpisodesCreatesCassettes
+ tests/integration/test_record_modes.py::TestRecordAll
+ tests/integration/test_unicode.py
+ tests/regression/test_gzip_compression.py
+ tests/regression/test_requests_2_11_body_matcher.py
+)
diff --git a/dev-python/betamax/betamax-0.8.1.ebuild b/dev-python/betamax/betamax-0.8.1.ebuild
deleted file mode 100644
index 2972a145cc33..000000000000
--- a/dev-python/betamax/betamax-0.8.1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
-inherit distutils-r1
-
-DESCRIPTION="python-requests HTTP exchanges recorder"
-HOMEPAGE="https://github.com/betamaxpy/betamax"
-SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
-IUSE="test"
-
-RDEPEND="dev-python/requests[${PYTHON_USEDEP}]"
-DEPEND="test? ( ${RDEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/betamax-0.8.1-tests.patch"
-)
-
-distutils_enable_tests pytest
-
-src_prepare() {
- rm tests/integration/test_hooks.py || die
- rm tests/integration/test_placeholders.py || die
- sed -e 's:test_records:_&:' \
- -e 's:test_replaces:_&:' \
- -e 's:test_replays:_&:' \
- -e 's:test_creates:_&:' \
- -i tests/integration/test_record_modes.py || die
- rm tests/integration/test_unicode.py || die
- rm tests/regression/test_gzip_compression.py || die
- rm tests/regression/test_requests_2_11_body_matcher.py || die
- distutils-r1_src_prepare
-}
diff --git a/dev-python/betamax/files/betamax-0.8.1-pytest.patch b/dev-python/betamax/files/betamax-0.8.1-pytest.patch
new file mode 100644
index 000000000000..e3bfe39c81ca
--- /dev/null
+++ b/dev-python/betamax/files/betamax-0.8.1-pytest.patch
@@ -0,0 +1,38 @@
+From 165cc321f2b9839418269e9493b03eb2e43f7ddf Mon Sep 17 00:00:00 2001
+From: Jiri Kuncar <jiri.kuncar@gmail.com>
+Date: Mon, 9 Sep 2019 12:23:18 +0200
+Subject: [PATCH] tests: fix direct calls to PyTest fixtures
+
+https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly
+---
+ tests/unit/test_fixtures.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/unit/test_fixtures.py b/tests/unit/test_fixtures.py
+index 387d9ce..41f33eb 100644
+--- a/tests/unit/test_fixtures.py
++++ b/tests/unit/test_fixtures.py
+@@ -27,9 +27,9 @@ def test_adds_stop_as_a_finalizer(self):
+ # Mock a pytest request object
+ request = mock.MagicMock()
+ request.cls = request.module = None
+- request.function.__name__ = 'test'
++ request.node.name = request.function.__name__ = 'test'
+
+- pytest_fixture.betamax_recorder(request)
++ pytest_fixture._betamax_recorder(request)
+ assert request.addfinalizer.called is True
+ request.addfinalizer.assert_called_once_with(self.mocked_betamax.stop)
+
+@@ -37,9 +37,9 @@ def test_auto_starts_the_recorder(self):
+ # Mock a pytest request object
+ request = mock.MagicMock()
+ request.cls = request.module = None
+- request.function.__name__ = 'test'
++ request.node.name = request.function.__name__ = 'test'
+
+- pytest_fixture.betamax_recorder(request)
++ pytest_fixture._betamax_recorder(request)
+ self.mocked_betamax.start.assert_called_once_with()
+
+
diff --git a/dev-python/betamax/files/betamax-0.8.1-tests.patch b/dev-python/betamax/files/betamax-0.8.1-tests.patch
deleted file mode 100644
index 19da7d108efd..000000000000
--- a/dev-python/betamax/files/betamax-0.8.1-tests.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/tests/unit/test_fixtures.py b/tests/unit/test_fixtures.py
-index 387d9ce..f0bdc3b 100644
---- a/tests/unit/test_fixtures.py
-+++ b/tests/unit/test_fixtures.py
-@@ -23,6 +23,7 @@ class TestPyTestFixture(unittest.TestCase):
- def tearDown(self):
- self.patched_betamax.stop()
-
-+ @pytest.mark.skip(reason="broken with newer pytest version")
- def test_adds_stop_as_a_finalizer(self):
- # Mock a pytest request object
- request = mock.MagicMock()
-@@ -33,6 +34,7 @@ class TestPyTestFixture(unittest.TestCase):
- assert request.addfinalizer.called is True
- request.addfinalizer.assert_called_once_with(self.mocked_betamax.stop)
-
-+ @pytest.mark.skip(reason="broken with newer pytest version")
- def test_auto_starts_the_recorder(self):
- # Mock a pytest request object
- request = mock.MagicMock()