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/agate-excel/
Date: Tue, 22 Jun 2021 01:30:20
Message-Id: 1624325334.7b7dbac9bd5ed1e8be910661393d655619680070.zmedico@gentoo
1 commit: 7b7dbac9bd5ed1e8be910661393d655619680070
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 22 01:21:28 2021 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 22 01:28:54 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b7dbac9
7
8 dev-python/agate-excel: Enable unit tests (bug 797379)
9
10 tests/test_table_xls.py::TestXLS::test_ambiguous_date PASSED [ 4%]
11 tests/test_table_xls.py::TestXLS::test_empty PASSED [ 8%]
12 tests/test_table_xls.py::TestXLS::test_file_like PASSED [ 13%]
13 tests/test_table_xls.py::TestXLS::test_from_xls PASSED [ 17%]
14 tests/test_table_xls.py::TestXLS::test_from_xls_with_column_names PASSED [ 21%]
15 tests/test_table_xls.py::TestXLS::test_header PASSED [ 26%]
16 tests/test_table_xls.py::TestXLS::test_numeric_column_name PASSED [ 30%]
17 tests/test_table_xls.py::TestXLS::test_sheet_index PASSED [ 34%]
18 tests/test_table_xls.py::TestXLS::test_sheet_multiple PASSED [ 39%]
19 tests/test_table_xls.py::TestXLS::test_sheet_name PASSED [ 43%]
20 tests/test_table_xls.py::TestXLS::test_skip_lines PASSED [ 47%]
21 tests/test_table_xls.py::TestXLS::test_zeros PASSED [ 52%]
22 tests/test_table_xlsx.py::TestXLSX::test_ambiguous_date FAILED [ 56%]
23 tests/test_table_xlsx.py::TestXLSX::test_empty PASSED [ 60%]
24 tests/test_table_xlsx.py::TestXLSX::test_file_like PASSED [ 65%]
25 tests/test_table_xlsx.py::TestXLSX::test_from_xlsx PASSED [ 69%]
26 tests/test_table_xlsx.py::TestXLSX::test_from_xlsx_with_column_names PASSED [ 73%]
27 tests/test_table_xlsx.py::TestXLSX::test_header PASSED [ 78%]
28 tests/test_table_xlsx.py::TestXLSX::test_numeric_column_name PASSED [ 82%]
29 tests/test_table_xlsx.py::TestXLSX::test_sheet_index PASSED [ 86%]
30 tests/test_table_xlsx.py::TestXLSX::test_sheet_multiple PASSED [ 91%]
31 tests/test_table_xlsx.py::TestXLSX::test_sheet_name PASSED [ 95%]
32 tests/test_table_xlsx.py::TestXLSX::test_skip_lines PASSED [100%]
33
34 Reported-py: Michał Górny <mgorny <AT> gentoo.org>
35 Closes: https://bugs.gentoo.org/797379
36 Package-Manager: Portage-3.0.20, Repoman-3.0.3
37 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
38
39 dev-python/agate-excel/agate-excel-0.2.3.ebuild | 27 +++++++++++++++++++++++--
40 1 file changed, 25 insertions(+), 2 deletions(-)
41
42 diff --git a/dev-python/agate-excel/agate-excel-0.2.3.ebuild b/dev-python/agate-excel/agate-excel-0.2.3.ebuild
43 index 224da100426..0774e1cfcad 100644
44 --- a/dev-python/agate-excel/agate-excel-0.2.3.ebuild
45 +++ b/dev-python/agate-excel/agate-excel-0.2.3.ebuild
46 @@ -15,10 +15,33 @@ SLOT="0"
47 KEYWORDS="~amd64"
48 IUSE=""
49 RDEPEND=""
50 -RESTRICT="test"
51 +IUSE="test +xml"
52 +RESTRICT="!test? ( test )"
53
54 +# Other packages have BDEPEND="test? ( dev-python/agate-excel[xml] )"
55 +AGATE_VERSION_DEP=">=dev-python/agate-1.5.0"
56 +TEST_AGAINST_RDEPEND="xml? ( ${AGATE_VERSION_DEP}[xml,${PYTHON_USEDEP}] )"
57 RDEPEND="
58 - >=dev-python/agate-1.5.0[${PYTHON_USEDEP}]
59 + ${AGATE_VERSION_DEP}[${PYTHON_USEDEP}]
60 >=dev-python/openpyxl-2.3.0[${PYTHON_USEDEP}]
61 >=dev-python/xlrd-0.9.4[${PYTHON_USEDEP}]
62 +
63 + ${TEST_AGAINST_RDEPEND}
64 "
65 +BDEPEND="test? ( ${AGATE_VERSION_DEP}[xml,${PYTHON_USEDEP}] )"
66 +
67 +distutils_enable_tests pytest
68 +
69 +python_test() {
70 + local pytest_args test_name xfails
71 +
72 + xfails=(
73 + tests/test_table_xlsx.py::TestXLSX::test_ambiguous_date
74 + )
75 +
76 + for test_name in "${xfails[@]}"; do
77 + pytest_args+=(--deselect "${test_name}")
78 + done
79 +
80 + epytest "${pytest_args[@]}" || die
81 +}