Accepting request 827019 from home:bnavigator:branches:devel:languages:python:pytest

- Fix test failures by testing the source directory in multibuild

I still believe the tests should check what is actually being installed, but you are the boss.

OBS-URL: https://build.opensuse.org/request/show/827019
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-astropy-header?expand=0&rev=7
This commit is contained in:
Tomáš Chvátal
2020-08-17 06:28:13 +00:00
committed by Git OBS Bridge
parent 41a6e02d01
commit 7f509c29a6
2 changed files with 11 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Aug 16 12:25:00 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Fix test failures by testing the source directory in multibuild
-------------------------------------------------------------------
Fri Jan 10 08:26:04 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>

View File

@@ -16,6 +16,7 @@
#
%define modname pytest-astropy-header
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global flavor @BUILD_FLAVOR@%{nil}
@@ -26,14 +27,14 @@
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-pytest-astropy-header%{psuffix}
Name: python-%{modname}%{psuffix}
Version: 0.1.2
Release: 0
Summary: Pytest plugin to add diagnostic information to the header of the test output
License: BSD-3-Clause
Group: Productivity/Scientific/Astronomy
URL: https://github.com/astropy/pytest-astropy-header
Source: https://files.pythonhosted.org/packages/source/p/pytest-astropy-header/pytest-astropy-header-%{version}.tar.gz
Source: https://files.pythonhosted.org/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz
BuildRequires: %{python_module setuptools >= 30.3.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -52,7 +53,7 @@ running pytest. It can be used with packages that are not affiliated with the
Astropy project, but is optimized for use with astropy-related projects.
%prep
%setup -q -n pytest-astropy-header-%{version}
%setup -q -n %{modname}-%{version}
%build
%python_build
@@ -65,6 +66,8 @@ Astropy project, but is optimized for use with astropy-related projects.
%check
%if %{with test}
# multibuild: nothing has been installed, test the source directory
export PYTHONPATH=$(pwd)
%pytest
%endif