Skip to content
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

fix test expectations #6316

Merged
merged 6 commits into from Apr 17, 2024
Merged

Conversation

ghost
Copy link

@ghost ghost commented Apr 17, 2024

Fixes #6312

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

Merging #6316 (6ea109a) into master (1d11ea3) will decrease coverage by 0.05%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

❗ Current head 6ea109a differs from pull request most recent head a339df3. Consider uploading reports for the commit a339df3 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6316      +/-   ##
==========================================
- Coverage   83.92%   83.88%   -0.05%     
==========================================
  Files         161      161              
  Lines       11972    11972              
  Branches     1865     1927      +62     
==========================================
- Hits        10048    10043       -5     
- Misses       1588     1594       +6     
+ Partials      336      335       -1     

see 3 files with indirect coverage changes

@@ -239,8 +239,11 @@ def __call__(self, a, b, c):
self.assertEqual(get_func_args(" ".join, stripself=True), ["iterable"])

if platform.python_implementation() == "CPython":
# doesn't work on CPython: https://bugs.python.org/issue42785
self.assertEqual(get_func_args(operator.itemgetter(2)), [])
# Didn't used to work on CPython: https://bugs.python.org/issue42785
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -239,8 +239,11 @@ def __call__(self, a, b, c):
self.assertEqual(get_func_args(" ".join, stripself=True), ["iterable"])

if platform.python_implementation() == "CPython":
# doesn't work on CPython: https://bugs.python.org/issue42785
self.assertEqual(get_func_args(operator.itemgetter(2)), [])
# This never worked on CPython: https://bugs.python.org/issue42785
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it didn't work but now works :) How about "This didn't work on older versions of CPython"?

Also I would update the issue URL to python/cpython#86951

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the link and the comment

@wRAR
Copy link
Member

wRAR commented Apr 17, 2024

Thanks!

@ghost
Copy link
Author

ghost commented Apr 17, 2024

Should I make a similar PR for scrapy/itemloaders#76?

@Gallaecio
Copy link
Member

Should I make a similar PR for scrapy/itemloaders#76?

That would be awesome!

@Gallaecio Gallaecio merged commit b1fe97d into scrapy:master Apr 17, 2024
25 checks passed
@ghost ghost deleted the 6312-fix-test-expectations branch April 18, 2024 05:01
wRAR pushed a commit that referenced this pull request Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_get_func_args() expectation changes in new Python point releases
2 participants