cpython icon indicating copy to clipboard operation
cpython copied to clipboard

bpo-39664: Add tests for operator module.

Open tirkarthi opened this issue 6 years ago • 3 comments

Add tests for operator module to improve coverage.

  • iconcat should have getitem implemented.
  • Test index and not functions.
  • Test length_hint default value type.

https://bugs.python.org/issue39664

tirkarthi avatar Feb 17 '20 16:02 tirkarthi

Codecov Report

Merging #18537 into master will increase coverage by 1.08%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #18537       +/-   ##
===========================================
+ Coverage   82.11%   83.20%    +1.08%     
===========================================
  Files        1956     1571      -385     
  Lines      589364   414757   -174607     
  Branches    44457    44457               
===========================================
- Hits       483966   345096   -138870     
+ Misses      95746    60015    -35731     
+ Partials     9652     9646        -6     
Impacted Files Coverage Δ
Lib/distutils/tests/test_bdist_rpm.py 30.00% <0.00%> (-65.00%) :arrow_down:
Lib/distutils/command/bdist_rpm.py 7.63% <0.00%> (-56.88%) :arrow_down:
Lib/test/test_urllib2net.py 76.92% <0.00%> (-13.85%) :arrow_down:
Lib/test/test_smtpnet.py 78.57% <0.00%> (-7.15%) :arrow_down:
Lib/ftplib.py 63.85% <0.00%> (-6.06%) :arrow_down:
Lib/test/test_ftplib.py 87.11% <0.00%> (-4.72%) :arrow_down:
Tools/scripts/db2pickle.py 17.82% <0.00%> (-3.97%) :arrow_down:
Tools/scripts/pickle2db.py 16.98% <0.00%> (-3.78%) :arrow_down:
Lib/test/test_socket.py 71.94% <0.00%> (-3.77%) :arrow_down:
Lib/test/test_asyncio/test_base_events.py 91.84% <0.00%> (-3.30%) :arrow_down:
... and 434 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4c1b6a6...42ebf5a. Read the comment docs.

codecov[bot] avatar Feb 17 '20 17:02 codecov[bot]

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

bedevere-bot avatar Nov 09 '22 10:11 bedevere-bot

Marking as pending because this has been stale for a couple of years with no followup to the code review. If this is abandoned we should perhaps close it.

iritkatriel avatar Nov 09 '22 10:11 iritkatriel

Thanks @iritkatriel for triaging. I am okay with closing this since this was mostly to make 100% code coverage and I am not actively working on this.

tirkarthi avatar Nov 11 '22 10:11 tirkarthi

I attempted to update this, but it won't let me push to it, so will make a new PR instead.


For reference:

$ gh co 18537 # branch is add-test-operator-module:refs/pull/18537/head
$ git merge upstream/main
$ # resolve conflict
$ git push
fatal: The upstream branch of your current branch does not match
the name of your current branch.  To push to the upstream branch
on the remote, use

    git push upstream HEAD:refs/pull/18537/head

To push to the branch of the same name on the remote, use

    git push upstream HEAD

To choose either option permanently, see push.default in 'git help config'.

To avoid automatically configuring an upstream branch when its name
won't match the local branch, see option 'simple' of branch.autoSetupMerge
in 'git help config'.
$ git push upstream HEAD:refs/pull/18537/head
Found existing alias for "git push". You should use: "gp"
Enumerating objects: 23, done.
Counting objects: 100% (23/23), done.
Delta compression using up to 8 threads
Compressing objects: 100% (15/15), done.
Writing objects: 100% (15/15), 1.81 KiB | 1.81 MiB/s, done.
Total 15 (delta 12), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (12/12), completed with 7 local objects.
To https://github.com/python/cpython.git
 ! [remote rejected]       HEAD -> refs/pull/18537/head (deny updating a hidden ref)

hugovk avatar Feb 24 '24 13:02 hugovk

Please see PR GH-115883.

hugovk avatar Feb 24 '24 13:02 hugovk