# # spec file for package python-pytest-arraydiff # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Tests require astropy, which in turn requires this package %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest-arraydiff Version: 0.2 Release: 0 License: BSD-2-Clause Summary: Pytest plugin to help with comparing array output from tests Url: https://github.com/astrofrog/pytest-arraydiff Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/p/pytest-arraydiff/pytest-arraydiff-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-numpy Requires: python-pytest Requires: python-six BuildArch: noarch %python_subpackages %description This is a py.test plugin to facilitate the generation and comparison of data arrays produced during tests. The basic idea is that you can write a test that generates a Numpy array (or other related objects depending on the format). 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. %prep %setup -q -n pytest-arraydiff-%{version} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %files %{python_files} %doc CHANGES.md README.rst %license LICENSE %{python_sitelib}/* %changelog