diff options
-rw-r--r-- | net-irc/limnoria/files/limnoria-20210617-rss-testRemoveAliasedFeed-mock_data.patch | 12 | ||||
-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[@]}" \ |