summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Kappus <joe@wt.gd>2022-10-11 14:02:05 -0400
committerSam James <sam@gentoo.org>2022-10-12 21:44:20 +0100
commit685c48d1f13accd80509dfa52a62fb93606da62c (patch)
tree702f1213e51c7b76279b0f7c66b2f24ee7ceee10 /net-nntp/sabnzbd
parentdev-python/tavalidate: new package, add 0.0.6 (diff)
downloadgentoo-685c48d1f13accd80509dfa52a62fb93606da62c.tar.gz
gentoo-685c48d1f13accd80509dfa52a62fb93606da62c.tar.bz2
gentoo-685c48d1f13accd80509dfa52a62fb93606da62c.zip
net-nntp/sabnzbd: add pytest, fix deps
Merging Kangie's updates to allow for test. Signed-off-by: Joe Kappus <joe@wt.gd> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-nntp/sabnzbd')
-rw-r--r--net-nntp/sabnzbd/sabnzbd-3.6.1.ebuild52
1 files changed, 43 insertions, 9 deletions
diff --git a/net-nntp/sabnzbd/sabnzbd-3.6.1.ebuild b/net-nntp/sabnzbd/sabnzbd-3.6.1.ebuild
index 6f28bd82c53c..22552e21fdd2 100644
--- a/net-nntp/sabnzbd/sabnzbd-3.6.1.ebuild
+++ b/net-nntp/sabnzbd/sabnzbd-3.6.1.ebuild
@@ -39,7 +39,7 @@ DEPEND="
dev-python/notify2[${PYTHON_USEDEP}]
dev-python/portend[${PYTHON_USEDEP}]
dev-python/puremagic[${PYTHON_USEDEP}]
- >=dev-python/sabyenc-5.4.2[${PYTHON_USEDEP}]
+ <dev-python/sabyenc-6[${PYTHON_USEDEP}]
')
"
@@ -53,11 +53,17 @@ BDEPEND="
test? (
$(python_gen_cond_dep '
dev-python/flaky[${PYTHON_USEDEP}]
+ >=dev-python/lxml-4.5.0[${PYTHON_USEDEP}]
dev-python/pkginfo[${PYTHON_USEDEP}]
dev-python/pyfakefs[${PYTHON_USEDEP}]
dev-python/pytest-httpbin[${PYTHON_USEDEP}]
dev-python/pytest-httpserver[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
dev-python/selenium[${PYTHON_USEDEP}]
+ dev-python/tavalidate[${PYTHON_USEDEP}]
+ dev-python/tavern[${PYTHON_USEDEP}]
+ dev-python/werkzeug[${PYTHON_USEDEP}]
dev-python/xmltodict[${PYTHON_USEDEP}]
')
www-apps/chromedriver-bin
@@ -72,6 +78,42 @@ pkg_setup() {
python-single-r1_pkg_setup
}
+src_test() {
+ local EPYTEST_IGNORE=(
+ # network sandbox
+ tests/test_getipaddress.py
+ tests/test_rss.py
+ tests/test_urlgrabber.py
+ tests/test_utils/test_happyeyeballs.py
+ tests/test_utils/test_internetspeed.py
+ )
+ local EPYTEST_DESELECT=(
+ # network sandbox
+ 'tests/test_consistency.py::TestWiki'
+ # Just plain fails
+ 'tests/test_newsunpack.py::TestPar2Repair::test_basic'
+ # Chromedriver tests don't want to behave in portage
+ 'tests/test_functional_config.py::TestBasicPages::test_base_pages'
+ 'tests/test_functional_config.py::TestBasicPages::test_base_submit_pages'
+ 'tests/test_functional_config.py::TestConfigLogin::test_login'
+ 'tests/test_functional_config.py::TestConfigCategories::test_page'
+ 'tests/test_functional_config.py::TestConfigRSS::test_rss_basic_flow'
+ 'tests/test_functional_config.py::TestConfigServers::test_add_and_remove_server'
+ 'tests/test_functional_downloads.py::TestDownloadFlow::test_download_basic_rar5'
+ 'tests/test_functional_downloads.py::TestDownloadFlow::test_download_zip'
+ 'tests/test_functional_downloads.py::TestDownloadFlow::test_download_7zip'
+ 'tests/test_functional_downloads.py::TestDownloadFlow::test_download_passworded'
+ 'tests/test_functional_downloads.py::TestDownloadFlow::test_download_fully_obfuscated'
+ 'tests/test_functional_downloads.py::TestDownloadFlow::test_download_unicode_rar'
+ 'tests/test_functional_misc.py::TestShowLogging::test_showlog'
+ 'tests/test_functional_misc.py::TestQueueRepair::test_queue_repair'
+ 'tests/test_functional_misc.py::TestDaemonizing::test_daemonizing'
+ )
+ epytest -s
+}
+
+
+
src_install() {
local d
@@ -102,14 +144,6 @@ src_install() {
systemd_newunit "${FILESDIR}"/sabnzbd_at.service 'sabnzbd@.service'
}
-src_test() {
- EPYTEST_IGNORE=(
- # Requires dev-python/tavern which is not currently packaged for Gentoo
- tests/test_functional_api.py
- )
- epytest
-}
-
pkg_postinst() {
if [[ -z "${REPLACING_VERSIONS}" ]]; then
# This is a new installation