commit: a50063274b728a1e117d4e9cfc483a95240d2b1b Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> AuthorDate: Sat Mar 11 10:17:03 2023 +0000 Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> CommitDate: Sat Mar 11 10:19:35 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a5006327
dev-python/dropbox: check pypi and tests Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org> dev-python/dropbox/dropbox-11.36.0.ebuild | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dev-python/dropbox/dropbox-11.36.0.ebuild b/dev-python/dropbox/dropbox-11.36.0.ebuild index c088da3c8..49177dc08 100644 --- a/dev-python/dropbox/dropbox-11.36.0.ebuild +++ b/dev-python/dropbox/dropbox-11.36.0.ebuild @@ -11,6 +11,7 @@ GH_PN=dropbox-sdk-python DESCRIPTION="The offical Dropbox SDK for Python" HOMEPAGE="https://www.dropbox.com/developers" +# pypi does not have tests, stick with gh SRC_URI="https://github.com/dropbox/${GH_PN}/archive/refs/tags/v${PV}.tar.gz -> ${GH_PN}-${PV}.gh.tar.gz" S="${WORKDIR}"/${GH_PN}-${PV} @@ -26,18 +27,19 @@ RDEPEND=" PATCHES=( "${FILESDIR}"/${P}-setuptools-67.patch ) +# disable tests that need SCOPED_USER_DROPBOX_TOKEN +# and tests that fail +EPYTEST_DESELECT=( + test/integration/test_dropbox.py + test/unit/test_dropbox_unit.py::TestClient + test/unit/test_dropbox_unit.py::TestOAuth::test_NoRedirect_whole_flow +) + distutils_enable_tests pytest python_prepare_all() { - # Don't run tests via setup.py pytest - sed -i -e "/'pytest-runner.*',/d" setup.py || die # this is wrong sed -i -e "s/^import mock$/from unittest import mock/" test/unit/test_dropbox_unit.py || die - # disable tests that need SCOPED_USER_DROPBOX_TOKEN - mv test/integration/test_dropbox.py test/integration/_test_dropbox.py || die - sed -i -e "s/\(class\) \(TestClient\)/\\1 _\\2/ - s/test_NoRedirect_whole_flow/_&/" test/unit/test_dropbox_unit.py || die - distutils-r1_python_prepare_all }
