diff options
author | Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> | 2021-10-17 21:20:41 +0500 |
---|---|---|
committer | Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> | 2021-10-17 21:24:02 +0500 |
commit | 79b550de634ced71240b255a6b1a918a86e7e145 (patch) | |
tree | a0d2c4c46ae444a919040aba367ef31e1c0e3943 | |
parent | app-misc/anki-bin: bump version (diff) | |
download | guru-79b550de634ced71240b255a6b1a918a86e7e145.tar.gz guru-79b550de634ced71240b255a6b1a918a86e7e145.tar.bz2 guru-79b550de634ced71240b255a6b1a918a86e7e145.zip |
dev-python/doubles: add docs and tests
Disable pypy3 because it fails too many tests.
Closes: https://bugs.gentoo.org/816600
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
-rw-r--r-- | dev-python/doubles/doubles-1.5.3.ebuild | 57 | ||||
-rw-r--r-- | dev-python/doubles/metadata.xml | 2 |
2 files changed, 47 insertions, 12 deletions
diff --git a/dev-python/doubles/doubles-1.5.3.ebuild b/dev-python/doubles/doubles-1.5.3.ebuild index ec9295606..debde427e 100644 --- a/dev-python/doubles/doubles-1.5.3.ebuild +++ b/dev-python/doubles/doubles-1.5.3.ebuild @@ -3,26 +3,61 @@ EAPI=8 -PYTHON_COMPAT=( python3_{8..10} pypy3 ) +PYTHON_COMPAT=( python3_{8..10} ) inherit distutils-r1 DESCRIPTION="Test doubles for Python" HOMEPAGE="https://github.com/uber/doubles" -SRC_URI="https://github.com/uber/doubles/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI="https://github.com/uber/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" SLOT="0" LICENSE="MIT" KEYWORDS="~amd64" -RDEPEND=" - dev-python/six[${PYTHON_USEDEP}] -" -DEPEND=" - ${RDEPEND} - test? ( - dev-python/nose[${PYTHON_USEDEP}] - ) -" +RDEPEND="dev-python/six[${PYTHON_USEDEP}]" +BDEPEND="test? ( dev-python/nose )" +DOCS=( CHANGES.rst CONTRIBUTING.rst README.rst ) + +distutils_enable_sphinx docs/source dev-python/sphinx_rtd_theme distutils_enable_tests pytest + +EPYTEST_DESELECT=( + test/allow_test.py::TestTwice::test_fails_when_called_three_times + test/allow_test.py::TestOnce::test_fails_when_called_two_times + test/allow_test.py::TestZeroTimes::test_fails_when_called_once_times + test/allow_test.py::TestExactly::test_called_with_zero + test/allow_test.py::TestExactly::test_fails_when_called_more_than_expected_times + test/allow_test.py::TestAtMost::test_fails_when_called_more_than_at_most_times + test/class_double_test.py::TestClassDouble::test_raises_when_stubbing_instance_methods + test/expect_test.py::TestExpect::test_with_args_validator_not_called + test/expect_test.py::TestExpect::test_raises_if_an_expected_method_call_without_args_is_not_made + test/expect_test.py::TestExpect::test_raises_if_an_expected_method_call_with_args_is_not_made + test/expect_test.py::TestExpect::test_raises_if_an_expected_method_call_with_default_args_is_not_made + test/expect_test.py::TestTwice::test_fails_when_called_once + test/expect_test.py::TestTwice::test_fails_when_called_three_times + test/expect_test.py::TestOnce::test_fails_when_called_two_times + test/expect_test.py::TestExactly::test_fails_when_called_less_than_expected_times + test/expect_test.py::TestExactly::test_fails_when_called_more_than_expected_times + test/expect_test.py::TestAtLeast::test_fails_when_called_less_than_at_least_times + test/expect_test.py::TestAtMost::test_fails_when_called_more_than_at_most_times + test/expect_test.py::Test__call__::test_unsatisfied_expectation + test/expect_test.py::Test__enter__::test_unsatisfied_expectation + test/expect_test.py::Test__exit__::test_unsatisfied_expectation + test/object_double_test.py::TestObjectDouble::test_raises_when_stubbing_nonexistent_methods + test/object_double_test.py::TestObjectDouble::test_raises_when_stubbing_noncallable_attributes + test/pytest_test.py +) + +python_prepare() { + # attempts to import "coverage" + echo "pytest_plugins = ['doubles.pytest_plugin']" > test/conftest.py || die + + # "Distribution information not found. Run 'setup.py develop'" + sed "s/pkg_resources.get_distribution.*/'${PV}'/" -i docs/source/conf.py || die +} + +python_test() { + epytest -p no:doubles test +} diff --git a/dev-python/doubles/metadata.xml b/dev-python/doubles/metadata.xml index fd81770d2..29562d9e2 100644 --- a/dev-python/doubles/metadata.xml +++ b/dev-python/doubles/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>lssndrbarbieri@gmail.com</email> |