#4 Avoid pytest-cov, disable xdist in RHEL builds
Merged a year ago by yselkowitz. Opened a year ago by yselkowitz.
rpms/ yselkowitz/python-rpmautospec rawhide  into  rawhide

file modified
+2 -4
@@ -1,5 +1,5 @@ 

  # when bootstrapping Python, pytest-xdist is not yet available

- %bcond_without xdist

+ %bcond xdist %{undefined rhel}


  %global srcname rpmautospec

@@ -24,7 +24,6 @@ 

  BuildRequires:  python3-koji

  BuildRequires:  python3-pygit2

  BuildRequires:  python%{python3_pkgversion}-pytest

- BuildRequires:  python%{python3_pkgversion}-pytest-cov

  %if %{with xdist}

  BuildRequires:  python%{python3_pkgversion}-pytest-xdist

@@ -123,8 +122,7 @@ 

  install -m 644  rpm/macros.d/macros.rpmautospec %{buildroot}%{rpmmacrodir}/



- PYTHONPATH="%{buildroot}%{python3_sitelib}" \

- %{__python3} -m pytest \

+ %pytest \

  %if %{with xdist}



Coverage tests are unwanted in both RHEL and Fedora builds:


pytest-xdist is unwanted in RHEL, so adjust the default accordingly.
Also, use the %%pytest macro to set appropriate variables.

Pull-Request has been merged by yselkowitz

a year ago