1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 DISTUTILS_USE_SETUPTOOLS=rdepend
7 PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
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"
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"
19 RESTRICT="!test? ( 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}]
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