Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/dbfread/
Date: Tue, 22 Jun 2021 03:21:35
Message-Id: 1624331894.63890c82da54646f07ea58c92e86d51961e9f445.zmedico@gentoo
1 commit: 63890c82da54646f07ea58c92e86d51961e9f445
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 22 03:16:31 2021 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 22 03:18:14 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63890c82
7
8 dev-python/dbfread: Enable unit tests (bug 797310)
9
10 dbfread/test_field_parser.py::test_0 PASSED [ 6%]
11 dbfread/test_field_parser.py::test_C PASSED [ 12%]
12 dbfread/test_field_parser.py::test_D PASSED [ 18%]
13 dbfread/test_field_parser.py::test_F PASSED [ 25%]
14 dbfread/test_field_parser.py::test_I PASSED [ 31%]
15 dbfread/test_field_parser.py::test_L PASSED [ 37%]
16 dbfread/test_field_parser.py::test_M PASSED [ 43%]
17 dbfread/test_field_parser.py::test_B PASSED [ 50%]
18 dbfread/test_field_parser.py::test_N PASSED [ 56%]
19 dbfread/test_field_parser.py::test_O PASSED [ 62%]
20 dbfread/test_field_parser.py::test_T PASSED [ 68%]
21 dbfread/test_field_parser.py::test_Y PASSED [ 75%]
22 dbfread/test_field_parser.py::test_hex_field PASSED [ 81%]
23 dbfread/test_invalid_value.py::test_repr PASSED [ 87%]
24 dbfread/test_invalid_value.py::test_type PASSED [ 93%]
25 dbfread/test_memo.py::test_missing_memofile PASSED [100%]
26
27 Reported-py: Michał Górny <mgorny <AT> gentoo.org>
28 Closes: https://bugs.gentoo.org/797310
29 Package-Manager: Portage-3.0.20, Repoman-3.0.3
30 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
31
32 dev-python/dbfread/Manifest | 1 +
33 dev-python/dbfread/dbfread-2.0.7.ebuild | 25 ++++++++++++++++++++++++-
34 2 files changed, 25 insertions(+), 1 deletion(-)
35
36 diff --git a/dev-python/dbfread/Manifest b/dev-python/dbfread/Manifest
37 index f6f5ebe70b1..0d551756ca3 100644
38 --- a/dev-python/dbfread/Manifest
39 +++ b/dev-python/dbfread/Manifest
40 @@ -1 +1,2 @@
41 +DIST dbfread-2.0.7-src.tar.gz 33045 BLAKE2B 96798f00aba4c30e7e83b468f368ca6730a7e095c9fec5bf5515ac6a152022adbf5339cd9e68e85f4eccac211ed4e307b9abf22249ef6420d722fa213210d7d7 SHA512 cf591fa5800e5471025175a4bbbb54cb26dc2a83bf328776e4386860370d9421edd9edd62cb9e3d463794d526c561a0f4744bb67b5e376edd471dc95100bc2c7
42 DIST dbfread-2.0.7.tar.gz 33212 BLAKE2B 03c9a0d93b13c7573b5bcec6c5af1ac43bd00ead2b3e83638f45344b2344062e86d764b095e699afdaea2405176ee15122c975a2f72b25bd167f5faaaf33043b SHA512 86c3a29e351b985984be67401a6dfe3e39cd92451a122788ade83d65313dde37a3706ce36c4365bd36ba1df62ee057b625f1e0f077aa4a248c7456258189f548
43
44 diff --git a/dev-python/dbfread/dbfread-2.0.7.ebuild b/dev-python/dbfread/dbfread-2.0.7.ebuild
45 index f9a2f585866..a2df9605710 100644
46 --- a/dev-python/dbfread/dbfread-2.0.7.ebuild
47 +++ b/dev-python/dbfread/dbfread-2.0.7.ebuild
48 @@ -9,9 +9,32 @@ inherit distutils-r1
49
50 DESCRIPTION="Read DBF Files with Python"
51 HOMEPAGE="https://github.com/olemb/dbfread https://pypi.org/project/dbfread/"
52 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
53 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
54 + test? ( https://github.com/olemb/dbfread/archive/refs/tags/${PV}.tar.gz -> ${P}-src.tar.gz )"
55 LICENSE="MIT"
56 SLOT="0"
57 KEYWORDS="~amd64"
58 IUSE=""
59 RDEPEND=""
60 +
61 +distutils_enable_tests pytest
62 +
63 +python_prepare_all() {
64 + sed -e 's|\[pytest\]|[tool:pytest]|' -i setup.cfg || die
65 + distutils-r1_python_prepare_all
66 +}
67 +
68 +python_test() {
69 + local pytest_args test_name xfails
70 +
71 + xfails=(
72 + dbfread/test_read_and_length.py::test_len
73 + dbfread/test_read_and_length.py::test_list
74 + )
75 +
76 + for test_name in "${xfails[@]}"; do
77 + pytest_args+=(--deselect "${test_name}")
78 + done
79 +
80 + epytest "${pytest_args[@]}" || die
81 +}