Bug 2059953

Summary: python-diff-cover fails to build with pytest 7
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-diff-coverAssignee: Orphan Owner <extras-orphan>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aurelien, awilliam, infra-sig, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-22 00:44:13 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:
Bug Depends On:    
Bug Blocks: 2016048, 2045102, 2050629    

Description Miro Hrončok 2022-03-02 11:56:21 UTC
In this copr repo, I have updated pytest to 7.0.1:

https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/

Based on this PR:

https://src.fedoraproject.org/rpms/pytest/pull-request/25

I'd like to update pytest to 7 in Fedora 37, but python-diff-cover 6.4.4-3 fails to build.

https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/package/python-diff-cover/

________________ TestSimpleReportGenerator.test_percent_covered ________________

self = <tests.test_report_generator.TestSimpleReportGenerator object at 0x7f27afc9c550>

    def test_percent_covered(self):
        # Check that we get the expected coverage percentages
        # By construction, both files have the same diff line
        # and coverage information
    
        # There are 6 lines that are both in the diff and measured,
        # and 4 of those are covered.
        for src_path in self.SRC_PATHS:
>           assert pytest.approx(self.report.percent_covered(src_path), 4.0 / 6 * 100)
E           AssertionError: approx() is not supported in a boolean context.
E           Did you mean: `assert a == approx(b)`?

tests/test_report_generator.py:191: AssertionError
=========================== short test summary info ============================
FAILED tests/test_report_generator.py::TestSimpleReportGenerator::test_percent_covered



This should be fixed in https://github.com/Bachmann1234/diff_cover/pull/264


There are several packages affected by this update, so I'd very much appreciate it if you could backport the fix.

Thanks!

Comment 1 Tomáš Hrnčiar 2022-04-21 14:15:18 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 37.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2022-04-27).

A week before the mass branching of Fedora 38 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 36 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-38/f-38-key-tasks.html

Comment 2 Tomáš Hrnčiar 2022-05-18 06:56:35 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 37.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-12-28).

A week before the mass branching of Fedora 38 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 36 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-38/f-38-key-tasks.html

Comment 3 Fedora Admin user for bugzilla script actions 2022-06-16 12:11:19 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 4 Adam Williamson 2022-06-22 00:44:13 UTC
This got fixed upstream along the way. More recent builds failed for a different reason, I have fixed that and sent a build to Rawhide that succeeded:
https://koji.fedoraproject.org/koji/taskinfo?taskID=88576572

Comment 5 Red Hat Bugzilla 2023-09-15 01:52:26 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days