-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-39664: Add tests for operator module. #18537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
42ebf5a
to
8717c9b
Compare
with self.assertRaisesRegex(TypeError, msg): | ||
operator.iconcat(X(), X()) | ||
|
||
def test_index(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operator.index
is already tested in Lib/test/test_index.py
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess test_index only checks the C version of the module. This test covers the Python version with self.module
used for C and Python version of the module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. Although it would be nice to extend this test. At least test it with int, float, Fraction, Decimal, None.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a merge conflict.
When you're done making the requested changes, leave the comment: |
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. |
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. |
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) |
Please see PR GH-115883. |
Add tests for operator module to improve coverage.
https://bugs.python.org/issue39664