summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2021-06-21 18:21:28 -0700
committerZac Medico <zmedico@gentoo.org>2021-06-21 18:28:54 -0700
commit7b7dbac9bd5ed1e8be910661393d655619680070 (patch)
tree05758403b77ce5ea292dfd42dad99552841baed2 /dev-python/agate-excel
parentdev-python/agate: add xml test-against dependency (diff)
downloadgentoo-7b7dbac9bd5ed1e8be910661393d655619680070.tar.gz
gentoo-7b7dbac9bd5ed1e8be910661393d655619680070.tar.bz2
gentoo-7b7dbac9bd5ed1e8be910661393d655619680070.zip
dev-python/agate-excel: Enable unit tests (bug 797379)
tests/test_table_xls.py::TestXLS::test_ambiguous_date PASSED [ 4%] tests/test_table_xls.py::TestXLS::test_empty PASSED [ 8%] tests/test_table_xls.py::TestXLS::test_file_like PASSED [ 13%] tests/test_table_xls.py::TestXLS::test_from_xls PASSED [ 17%] tests/test_table_xls.py::TestXLS::test_from_xls_with_column_names PASSED [ 21%] tests/test_table_xls.py::TestXLS::test_header PASSED [ 26%] tests/test_table_xls.py::TestXLS::test_numeric_column_name PASSED [ 30%] tests/test_table_xls.py::TestXLS::test_sheet_index PASSED [ 34%] tests/test_table_xls.py::TestXLS::test_sheet_multiple PASSED [ 39%] tests/test_table_xls.py::TestXLS::test_sheet_name PASSED [ 43%] tests/test_table_xls.py::TestXLS::test_skip_lines PASSED [ 47%] tests/test_table_xls.py::TestXLS::test_zeros PASSED [ 52%] tests/test_table_xlsx.py::TestXLSX::test_ambiguous_date FAILED [ 56%] tests/test_table_xlsx.py::TestXLSX::test_empty PASSED [ 60%] tests/test_table_xlsx.py::TestXLSX::test_file_like PASSED [ 65%] tests/test_table_xlsx.py::TestXLSX::test_from_xlsx PASSED [ 69%] tests/test_table_xlsx.py::TestXLSX::test_from_xlsx_with_column_names PASSED [ 73%] tests/test_table_xlsx.py::TestXLSX::test_header PASSED [ 78%] tests/test_table_xlsx.py::TestXLSX::test_numeric_column_name PASSED [ 82%] tests/test_table_xlsx.py::TestXLSX::test_sheet_index PASSED [ 86%] tests/test_table_xlsx.py::TestXLSX::test_sheet_multiple PASSED [ 91%] tests/test_table_xlsx.py::TestXLSX::test_sheet_name PASSED [ 95%] tests/test_table_xlsx.py::TestXLSX::test_skip_lines PASSED [100%] Reported-py: Michał Górny <mgorny@gentoo.org> Closes: https://bugs.gentoo.org/797379 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'dev-python/agate-excel')
-rw-r--r--dev-python/agate-excel/agate-excel-0.2.3.ebuild27
1 files changed, 25 insertions, 2 deletions
diff --git a/dev-python/agate-excel/agate-excel-0.2.3.ebuild b/dev-python/agate-excel/agate-excel-0.2.3.ebuild
index 224da100426a..0774e1cfcadd 100644
--- a/dev-python/agate-excel/agate-excel-0.2.3.ebuild
+++ b/dev-python/agate-excel/agate-excel-0.2.3.ebuild
@@ -15,10 +15,33 @@ SLOT="0"
KEYWORDS="~amd64"
IUSE=""
RDEPEND=""
-RESTRICT="test"
+IUSE="test +xml"
+RESTRICT="!test? ( test )"
+# Other packages have BDEPEND="test? ( dev-python/agate-excel[xml] )"
+AGATE_VERSION_DEP=">=dev-python/agate-1.5.0"
+TEST_AGAINST_RDEPEND="xml? ( ${AGATE_VERSION_DEP}[xml,${PYTHON_USEDEP}] )"
RDEPEND="
- >=dev-python/agate-1.5.0[${PYTHON_USEDEP}]
+ ${AGATE_VERSION_DEP}[${PYTHON_USEDEP}]
>=dev-python/openpyxl-2.3.0[${PYTHON_USEDEP}]
>=dev-python/xlrd-0.9.4[${PYTHON_USEDEP}]
+
+ ${TEST_AGAINST_RDEPEND}
"
+BDEPEND="test? ( ${AGATE_VERSION_DEP}[xml,${PYTHON_USEDEP}] )"
+
+distutils_enable_tests pytest
+
+python_test() {
+ local pytest_args test_name xfails
+
+ xfails=(
+ tests/test_table_xlsx.py::TestXLSX::test_ambiguous_date
+ )
+
+ for test_name in "${xfails[@]}"; do
+ pytest_args+=(--deselect "${test_name}")
+ done
+
+ epytest "${pytest_args[@]}" || die
+}