summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Jorna <wraeth@gentoo.org>2021-07-05 19:40:38 +1000
committerSam Jorna <wraeth@gentoo.org>2021-07-05 19:41:13 +1000
commit295f94bed864d6f54d4abb81f28b40155a614e70 (patch)
tree1ef72c6eedec3bc31ab74bd191dc5fa59def02f0
parentdev-python/linecache2: Eliminate unittest2 dep (diff)
downloadgentoo-295f94be.tar.gz
gentoo-295f94be.tar.bz2
gentoo-295f94be.zip
net-irc/limnoria: add RSS, fix version, fix tests
Fixes the version reported by the bot - previously would only report as 'installed on timestamp', now reports actual version. Stop removing the RSS plugin as the conflict caused by its presence no longer appears to exist. Also add upstream patch to fix broken test in RSS tests (GH#1479). Re-enable the Aka tests as issue resolved in GH#1392. Bug: https://github.com/ProgVal/Limnoria/issues/1392 Bug: https://github.com/ProgVal/Limnoria/issues/1479 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Sam Jorna <wraeth@gentoo.org>
-rw-r--r--net-irc/limnoria/files/limnoria-20210617-rss-testRemoveAliasedFeed-mock_data.patch12
-rw-r--r--net-irc/limnoria/limnoria-20210617-r1.ebuild (renamed from net-irc/limnoria/limnoria-20210617.ebuild)15
2 files changed, 21 insertions, 6 deletions
diff --git a/net-irc/limnoria/files/limnoria-20210617-rss-testRemoveAliasedFeed-mock_data.patch b/net-irc/limnoria/files/limnoria-20210617-rss-testRemoveAliasedFeed-mock_data.patch
new file mode 100644
index 000000000000..f3a579112848
--- /dev/null
+++ b/net-irc/limnoria/files/limnoria-20210617-rss-testRemoveAliasedFeed-mock_data.patch
@@ -0,0 +1,12 @@
+diff --git a/plugins/RSS/test.py b/plugins/RSS/test.py
+index eab10c61b..a9e3c07c6 100644
+--- a/plugins/RSS/test.py
++++ b/plugins/RSS/test.py
+@@ -102,6 +102,7 @@ def testCantAddDuplicatedFeed(self):
+
+ @mock_urllib
+ def testRemoveAliasedFeed(self, mock):
++ mock._data = xkcd_new
+ try:
+ self.assertNotError('rss announce add http://xkcd.com/rss.xml')
+ self.assertNotError('rss add xkcd http://xkcd.com/rss.xml')
diff --git a/net-irc/limnoria/limnoria-20210617.ebuild b/net-irc/limnoria/limnoria-20210617-r1.ebuild
index 03b9171f694b..cdecec64aaaf 100644
--- a/net-irc/limnoria/limnoria-20210617.ebuild
+++ b/net-irc/limnoria/limnoria-20210617-r1.ebuild
@@ -5,6 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
DISTUTILS_USE_SETUPTOOLS=no
+DISTUTILS_IN_SOURCE_BUILD=yes # needed for tests
inherit distutils-r1
MY_PV="${PV:0:4}-${PV:4:2}-${PV:6:2}"
@@ -43,10 +44,14 @@ RDEPEND="
!net-irc/supybot-plugins"
BDEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}] )"
-python_prepare() {
- einfo "Removing the RSS plugin because of clashes between libxml2's Python3"
- einfo "bindings and feedparser."
- rm -r "plugins/RSS" || die
+PATCHES=(
+ "${FILESDIR}/${P}-rss-testRemoveAliasedFeed-mock_data.patch" # GH#1479
+)
+
+python_prepare_all() {
+ # replace "installed on ${timestamp}" with real version
+ echo "version='${MY_PV}'" > "${S}"/src/version.py || die
+ distutils-r1_python_prepare_all
}
python_test() {
@@ -56,8 +61,6 @@ python_test() {
# intermittent failure due to issues loading libsandbox.so from LD_PRELOAD
# runs successfully when running the tests on the installed system
EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Unix" )
- # Runs despite --no-network (GH #1392)
- EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Aka" )
"${EPYTHON}" "${BUILD_DIR}"/scripts/supybot-test "${BUILD_DIR}/../test" \
--plugins-dir="${PLUGINS_DIR}" --no-network \
--disable-multiprocessing "${EXCLUDE_PLUGINS[@]}" \