Bug 1935212
Summary: | %_pyproject_builddir sometimes leaks to pytest collection | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
Component: | pyproject-rpm-macros | Assignee: | Miro Hrončok <mhroncok> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | lbalhar, mhroncok, pviktori, python-sig |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | pyproject-rpm-macros-0-41.fc35 pyproject-rpm-macros-0-42.fc34 pyproject-rpm-macros-0-42.fc33 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-07-04 01:07:15 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Miro Hrončok
2021-03-04 14:39:28 UTC
A "simple" solution might be to pass PYTEST_ADDOPTS='--ignore %_pyproject_builddir' in %pytest and %tox. https://docs.pytest.org/en/stable/reference.html#envvar-PYTEST_ADDOPTS %tox is defined in pyproject-rpm-macros, the fix is trivial. %pytest is defined in python-rpm-macros, so unless we want to spaghetti the two macro sets together, we can adapt it to do %{?_pytest_addopts:PYTEST_ADDOPTS='%{_pytest_addopts}'} and define %_pytest_addopts in pyproject_rpm_macros. Another related issue I've just met is when %_pyproject_builddir contains a copy of conftest.py which defines CLI arguments for pytest - then the arguments are defined twice which leads to: ValueError: option names {'--run-integration'} already added. (In reply to Lumír Balhar from comment #2) > Another related issue I've just met is when %_pyproject_builddir contains a > copy of conftest.py which defines CLI arguments for pytest - then the > arguments are defined twice which leads to: ValueError: option names > {'--run-integration'} already added. Just to clarify, adding --ignore %_pyproject_builddir solves that problem as well? (In reply to Miro Hrončok from comment #3) > (In reply to Lumír Balhar from comment #2) > > Another related issue I've just met is when %_pyproject_builddir contains a > > copy of conftest.py which defines CLI arguments for pytest - then the > > arguments are defined twice which leads to: ValueError: option names > > {'--run-integration'} already added. > > Just to clarify, adding --ignore %_pyproject_builddir solves that problem as > well? Yes, sorry for not mentioning it before. https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/102 https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/168 FEDORA-2021-872314c50e has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-872314c50e FEDORA-2021-f5e7993ed1 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-f5e7993ed1 FEDORA-2021-02f02941bb has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2021-872314c50e has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-872314c50e` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-872314c50e See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-f5e7993ed1 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-f5e7993ed1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-f5e7993ed1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-f5e7993ed1 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-f5e7993ed1 FEDORA-2021-f5e7993ed1 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-f5e7993ed1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-f5e7993ed1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-872314c50e has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-872314c50e` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-872314c50e See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-872314c50e has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2021-f5e7993ed1 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report. |