diff options
Diffstat (limited to '')
-rw-r--r-- | devel/py-pytest-arraydiff/Makefile | 29 | ||||
-rw-r--r-- | devel/py-pytest-arraydiff/distinfo | 3 | ||||
-rw-r--r-- | devel/py-pytest-arraydiff/pkg-descr | 16 |
3 files changed, 48 insertions, 0 deletions
diff --git a/devel/py-pytest-arraydiff/Makefile b/devel/py-pytest-arraydiff/Makefile new file mode 100644 index 000000000000..f827c3f124b1 --- /dev/null +++ b/devel/py-pytest-arraydiff/Makefile @@ -0,0 +1,29 @@ +PORTNAME= pytest-arraydiff +DISTVERSION= 0.6.1 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Pytest plugin to help with comparing array output from tests +WWW= https://github.com/astropy/pytest-arraydiff + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}pytest>=4.6:devel/py-pytest@${PY_FLAVOR} + +USES= python +USE_PYTHON= pep517 autoplist pytest + +NO_ARCH= yes + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +# tests as of 0.6.1: 18 passed in 32.31s + +.include <bsd.port.mk> diff --git a/devel/py-pytest-arraydiff/distinfo b/devel/py-pytest-arraydiff/distinfo new file mode 100644 index 000000000000..51c9960f06a9 --- /dev/null +++ b/devel/py-pytest-arraydiff/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1757266057 +SHA256 (pytest-arraydiff-0.6.1.tar.gz) = 2937b1450fc935620f24709d87d40c67e055a043d7b8541a25fdfa994dda67de +SIZE (pytest-arraydiff-0.6.1.tar.gz) = 16907 diff --git a/devel/py-pytest-arraydiff/pkg-descr b/devel/py-pytest-arraydiff/pkg-descr new file mode 100644 index 000000000000..d4c6f298dd68 --- /dev/null +++ b/devel/py-pytest-arraydiff/pkg-descr @@ -0,0 +1,16 @@ +pytest-arraydiff is a py.test plugin to facilitate the generation and comparison +of data arrays produced during tests, in particular in cases where the arrays +are too large to conveniently hard-code them in the tests +(e.g. np.testing.assert_allclose(x, [1, 2, 3])). + +The basic idea is that you can write a test that generates a Numpy array (or +other related objects depending on the format, e.g. pandas DataFrame). You can +then either run the tests in a mode to generate reference files from the arrays, +or you can run the tests in comparison mode, which will compare the results of +the tests to the reference ones within some tolerance. + +At the moment, the supported file formats for the reference files are: +* A plain text-based format (based on Numpy loadtxt output) +* The FITS format (requires astropy). With this format, tests can return either + a Numpy array for a FITS HDU object. +* A pandas HDF5 format using the pandas HDFStore |