1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
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"
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"
18 RESTRICT="!test? ( test )"
22 dev-python/setuptools[${PYTHON_USEDEP}]
24 dev-python/genty[${PYTHON_USEDEP}]
25 dev-python/mock[${PYTHON_USEDEP}]
26 dev-python/nose[${PYTHON_USEDEP}]
27 dev-python/pytest[${PYTHON_USEDEP}]
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