sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / dev-python / flaky / flaky-3.6.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 DISTUTILS_USE_SETUPTOOLS=rdepend
7 PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
8
9 inherit distutils-r1
10
11 DESCRIPTION="Plugin for nose or py.test that automatically reruns flaky tests"
12 HOMEPAGE="https://pypi.org/project/flaky/ https://github.com/box/flaky"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 SLOT="0"
16 LICENSE="Apache-2.0"
17 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
18 IUSE="test"
19 RESTRICT="!test? ( test )"
20
21 DEPEND="
22         test? (
23                 dev-python/genty[${PYTHON_USEDEP}]
24                 dev-python/mock[${PYTHON_USEDEP}]
25                 dev-python/nose[${PYTHON_USEDEP}]
26                 dev-python/pytest[${PYTHON_USEDEP}]
27         )
28 "
29 python_test() {
30         nosetests --with-flaky --exclude="test_nose_options_example" test/test_nose/ || die
31         pytest -k 'example and not options' --doctest-modules test/test_pytest/ || die
32         pytest -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py || die
33         nosetests --with-flaky --force-flaky --max-runs 2 test/test_nose/test_nose_options_example.py || die
34         pytest --force-flaky --max-runs 2  test/test_pytest/test_pytest_options_example.py || die
35 }