mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-13 00:53:02 -04:00
dev-python/dropbox: check pypi and tests
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user