diff options
Diffstat (limited to 'devel/py-pytest-arraydiff/pkg-descr')
-rw-r--r-- | devel/py-pytest-arraydiff/pkg-descr | 16 |
1 files changed, 16 insertions, 0 deletions
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 |