dev-python/dbusmock: New package for easily running tests by D-Bus requiring software

Needed by gnome-settings-daemon power plugin tests
This commit is contained in:
Mart Raudsepp
2017-05-28 18:15:02 +03:00
parent c2fe1fc086
commit ee46753000
4 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST dbusmock-0.16.7.tar.gz 70544 SHA256 2d2ea892fa4633c3ec6ac1e912120ec493047a5c6522849b7d1c95ad755bce75 SHA512 749728b966b1e067a0a8bd61ee64c1c7ff22751ccb48e15096d041e78c6e779d787160ee191e90daa3177b92c0ee45c66af74b2dd4e4bcb570892b431ec13467 WHIRLPOOL 921c47fb0b86a6a3368c3b37c27f30b75edacefb46f1a726e39f35eb7b1ea7d0f78c3a7e04b218016c558578625ff28188bfece7cbc7aa06405effe4ab614f92

View File

@@ -0,0 +1,45 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
PYTHON_REQ_USE="xml(+)"
inherit distutils-r1
MY_PN="python-${PN}"
MY_P="${MY_PN}-${PV}"
S="${WORKDIR}/${MY_P}"
DESCRIPTION="Easily create mock objects on D-Bus for software testing"
HOMEPAGE="https://github.com/martinpitt/python-dbusmock"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
LICENSE="LGPL-3+"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
RDEPEND="
dev-python/dbus-python[${PYTHON_USEDEP}]
dev-python/pygobject:3[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
>=dev-python/setuptools-17.1[${PYTHON_USEDEP}]
test? (
dev-python/nose[${PYTHON_USEDEP}]
)"
PATCHES=(
"${FILESDIR}"/${PV}-disable-pyflakes-test.patch
)
python_test() {
nosetests --verbose || die "tests fail under ${EPYTHON}"
}
python_install_all() {
local DOCS=( NEWS README.rst )
distutils-r1_python_install_all
}

View File

@@ -0,0 +1,20 @@
https://github.com/martinpitt/python-dbusmock/issues/28
--- a/tests/test_code.orig
+++ b/tests/test_code.py
@@ -17,6 +17,7 @@
class StaticCodeTests(unittest.TestCase):
+ """
@unittest.skipIf(subprocess.call(['which', 'pyflakes'],
stdout=subprocess.PIPE) != 0,
'pyflakes not installed')
@@ -25,6 +26,7 @@
universal_newlines=True)
(out, err) = pyflakes.communicate()
self.assertEqual(pyflakes.returncode, 0, out)
+ """
@unittest.skipIf(subprocess.call(['which', 'pep8'],
stdout=subprocess.PIPE) != 0,

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
</pkgmetadata>