This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Improve test coverage of functools.total_ordering
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: RusselWebber, rhettinger
Priority: normal Keywords: patch

Created on 2022-01-15 10:55 by RusselWebber, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30616 merged RusselWebber, 2022-01-15 11:17
Messages (3)
msg410639 - (view) Author: Russel Webber (RusselWebber) * Date: 2022-01-15 10:55
A few lines of the functools.total_ordering implementation are not covered by the tests.

Specifically, coverage.py shows the returns of NotImplemented:
...
    if op_result is NotImplemented:
        return op_result 
...

as not covered in the functions: _gt_from_lt, _ge_from_le, _lt_from_le, _lt_from_gt, _le_from_ge and _gt_from_ge

I have a PR for this.
msg410663 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2022-01-15 22:15
New changeset 0a28118324f64851b684ec3afdd063c47513a236 by Russel Webber in branch 'main':
bpo-46388: Test NotImplemented code path for functools.total_ordering (GH-30616)
https://github.com/python/cpython/commit/0a28118324f64851b684ec3afdd063c47513a236
msg410664 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2022-01-15 22:16
Thanks for the PR.
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90546
2022-01-15 22:16:23rhettingersetstatus: open -> closed
resolution: fixed
messages: + msg410664

stage: patch review -> resolved
2022-01-15 22:15:39rhettingersetmessages: + msg410663
2022-01-15 14:34:00rhettingersetassignee: rhettinger
2022-01-15 11:17:31RusselWebbersetkeywords: + patch
stage: patch review
pull_requests: + pull_request28819
2022-01-15 10:55:47RusselWebbercreate