summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+}