*/*: Clean PYTHON_COMPAT of obsolete impls
[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 PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Plugin for nose or py.test that automatically reruns flaky tests"
11 HOMEPAGE="https://pypi.org/project/flaky/ https://github.com/box/flaky"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 SLOT="0"
15 LICENSE="Apache-2.0"
16 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
17 IUSE="test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND=""
21 DEPEND="${RDEPEND}
22         dev-python/setuptools[${PYTHON_USEDEP}]
23         test? (
24                 dev-python/genty[${PYTHON_USEDEP}]
25                 dev-python/mock[${PYTHON_USEDEP}]
26                 dev-python/nose[${PYTHON_USEDEP}]
27                 dev-python/pytest[${PYTHON_USEDEP}]
28         )
29 "
30 python_test() {
31         nosetests --with-flaky --exclude="test_nose_options_example" test/test_nose/ || die
32         pytest -k 'example and not options' --doctest-modules test/test_pytest/ || die
33         pytest -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py || die
34         nosetests --with-flaky --force-flaky --max-runs 2 test/test_nose/test_nose_options_example.py || die
35         pytest --force-flaky --max-runs 2  test/test_pytest/test_pytest_options_example.py || die
36 }