diff options
author | Gerion Entrup <entrup@sra.uni-hannover.de> | 2019-07-13 00:02:45 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-07-16 17:22:18 +0200 |
commit | c7c44e7d68910acacef6d3c2efdfca980c44098c (patch) | |
tree | aaa587ba8bd13b7ed2de91d4af61a9c8f2bc698f /dev-python/python-musicbrainz-ngs | |
parent | net-analyzer/chaosreader: remove unused patches (diff) | |
download | gentoo-c7c44e7d68910acacef6d3c2efdfca980c44098c.tar.gz gentoo-c7c44e7d68910acacef6d3c2efdfca980c44098c.tar.bz2 gentoo-c7c44e7d68910acacef6d3c2efdfca980c44098c.zip |
dev-python/python-musicbrainz-ngs: python3.7 and fix test cases
Closes: https://bugs.gentoo.org/689178
Closes: https://bugs.gentoo.org/653426
Package-Manager: Portage-2.3.66, Repoman-2.3.11
Signed-off-by: Gerion Entrup <gerion.entrup@flump.de>
Closes: https://github.com/gentoo/gentoo/pull/12436
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/python-musicbrainz-ngs')
-rw-r--r-- | dev-python/python-musicbrainz-ngs/files/0.6-fix-test-submit.patch | 32 | ||||
-rw-r--r-- | dev-python/python-musicbrainz-ngs/python-musicbrainz-ngs-0.6.ebuild | 8 |
2 files changed, 37 insertions, 3 deletions
diff --git a/dev-python/python-musicbrainz-ngs/files/0.6-fix-test-submit.patch b/dev-python/python-musicbrainz-ngs/files/0.6-fix-test-submit.patch new file mode 100644 index 000000000000..4881936c80b1 --- /dev/null +++ b/dev-python/python-musicbrainz-ngs/files/0.6-fix-test-submit.patch @@ -0,0 +1,32 @@ +diff --git a/test/test_submit.py b/test/test_submit.py +index bce5362..2d13811 100644 +--- a/test/test_submit.py ++++ b/test/test_submit.py +@@ -1,13 +1,23 @@ + import unittest +-import os +-import sys +-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) +- + import musicbrainzngs + from musicbrainzngs import musicbrainz + from test import _common + ++ + class SubmitTest(unittest.TestCase): ++ ++ def setUp(self): ++ self.orig_opener = musicbrainzngs.compat.build_opener ++ musicbrainz.set_useragent("test_client", "1.0") ++ musicbrainz.auth("user", "password") ++ ++ def tearDown(self): ++ musicbrainzngs.compat.build_opener = self.orig_opener ++ musicbrainz._useragent = "" ++ musicbrainz._client = "" ++ musicbrainz.user = "" ++ musicbrainz.password = "" ++ + def test_submit_tags(self): + self.opener = _common.FakeOpener("<response/>") + musicbrainzngs.compat.build_opener = lambda *args: self.opener diff --git a/dev-python/python-musicbrainz-ngs/python-musicbrainz-ngs-0.6.ebuild b/dev-python/python-musicbrainz-ngs/python-musicbrainz-ngs-0.6.ebuild index 6dbb0b8902d6..4c2de26e4996 100644 --- a/dev-python/python-musicbrainz-ngs/python-musicbrainz-ngs-0.6.ebuild +++ b/dev-python/python-musicbrainz-ngs/python-musicbrainz-ngs-0.6.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -PYTHON_COMPAT=( python{2_7,3_5,3_6} ) +PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) inherit distutils-r1 @@ -20,6 +20,8 @@ IUSE="doc examples test" S="${WORKDIR}/${MY_PN}-${PV}" +PATCHES="${FILESDIR}/0.6-fix-test-submit.patch" + DEPEND="${RDEPEND} dev-python/setuptools[${PYTHON_USEDEP}] doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" |