[tasks/rpm-test-deps.yaml] install pytest from PyPI on CentOS
tmp_path fixture was added in pytest-3.9 and there's 3.4 in epel8
dnf:
name:
- python3-flexmock
- - python3-pytest
- - python3-pytest-cov
- python3-setuptools_scm_git_archive
- python3-setuptools_scm
- python3-distro
state: present
become: true
-- name: Install rpmautospec-rpm-macros
+
+- name: Install pytest & rpmautospec-rpm-macros
dnf:
name:
+ - python3-pytest-cov
- rpmautospec-rpm-macros
state: present
+ # rpmautospec-rpm-macros is not in epel
when: ansible_distribution == 'Fedora'
become: true
+
+# We need >=3.9 for tmp_path fixture, there's 3.4 in epel
+- name: Install pytest from PyPI
+ pip:
+ name: pytest-cov
+ when: ansible_distribution != 'Fedora'
+ become: true
