diff options
author | Matthew Seaman <matthew@FreeBSD.org> | 2024-05-06 14:31:10 +0100 |
---|---|---|
committer | Matthew Seaman <matthew@FreeBSD.org> | 2024-05-06 14:35:00 +0100 |
commit | 2c92806517d37a0cfffa18504601656ec2c66a42 (patch) | |
tree | 67fe2c211bec21af5576f8cf2f1e33b88135e32c /textproc/py-csvkit | |
parent | textproc/py-agate-excel: fix incorrect dependency, add testing (diff) |
textproc/py-csvkit: add testing
Two tests out of 337 fail due to sqlite not formatting a decimal
number precisely as expected or because it interprets a term in
"double quotes" as a column name. Not actual flaws in cvskit code.
This testing revealed errors in the textproc/py-agate-excel port.
Diffstat (limited to 'textproc/py-csvkit')
-rw-r--r-- | textproc/py-csvkit/Makefile | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/textproc/py-csvkit/Makefile b/textproc/py-csvkit/Makefile index 9793c4dc61d5..492165363d5a 100644 --- a/textproc/py-csvkit/Makefile +++ b/textproc/py-csvkit/Makefile @@ -1,5 +1,6 @@ PORTNAME= csvkit PORTVERSION= 2.0.0 +PORTREVISION= 1 CATEGORIES= textproc python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -18,10 +19,27 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}agate>=1.6.3:textproc/py-agate@${PY_FLAVOR} ${PYTHON_PKGNAMEPREFIX}sqlalchemy20>=0:databases/py-sqlalchemy20@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}xlrd>=0:textproc/py-xlrd@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}coverage>=4.4.2:devel/py-coverage@${PY_FLAVOR} + USES= python -USE_PYTHON= autoplist distutils +USE_PYTHON= autoplist distutils pytest NO_ARCH= yes +# Failures of the two listed tests are due to sqlite and not the csvkit code itself. +# +# E sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: Chicago% +# E [SQL: SELECT text FROM testfixed_converted WHERE text LIKE "Chicago%"] +# E (Background on this error at: https://sqlalche.me/e/20/e3q8) +# +# > self.assertEqual(output, '9,748.346\n') +# E AssertionError: '9748.346\n' != '9,748.346\n' +# E - 9748.346 +# E + 9,748.346 +# E ? + + +PYTEST_BROKEN_TESTS= test_query_text test_decimal_format + .include <bsd.port.pre.mk> .if ${PYTHON_REL} < 31000 |