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

wrap GeneratorModel methods into BoundMethod; remove redundant test #2584

Merged

Conversation

temyurchenko
Copy link
Contributor

The LookupTest.test_generator_attributes contains outdated Python 2
code (doesn't run on Python 3). The test is superceded by
GeneratorModelTest.test_model.

A part of getting rid of non-Module roots, see #2536

Supersedes #2563.

The LookupTest.test_generator_attributes contains outdated Python 2
   code (doesn't run on Python 3). The test is superceded by
   GeneratorModelTest.test_model.
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.24%. Comparing base (eb88dfe) to head (b6de90b).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2584      +/-   ##
==========================================
+ Coverage   93.10%   93.24%   +0.13%     
==========================================
  Files          93       93              
  Lines       11065    11066       +1     
==========================================
+ Hits        10302    10318      +16     
+ Misses        763      748      -15     
Flag Coverage Δ
linux 93.12% <100.00%> (+0.13%) ⬆️
pypy 93.24% <100.00%> (+0.13%) ⬆️
windows 93.22% <100.00%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
astroid/bases.py 88.91% <100.00%> (+0.62%) ⬆️
astroid/interpreter/objectmodel.py 96.28% <100.00%> (+2.47%) ⬆️
astroid/raw_building.py 94.88% <ø> (-0.04%) ⬇️

... and 1 file with indirect coverage changes

@temyurchenko
Copy link
Contributor Author

A bit confused by the coverage report. Clearly, #L705 is covered by GeneratorModelTest.test_model. There is also AsyncGeneratorTest, which should cover the __init__ of the AsyncGenerator. Any ideas?

@temyurchenko
Copy link
Contributor Author

A bit confused by the coverage report. Clearly, #L705 is covered by GeneratorModelTest.test_model. There is also AsyncGeneratorTest, which should cover the __init__ of the AsyncGenerator. Any ideas?

AsyncGeneratorTest wasn't inheriting from unittest.TestCase and thus it was skipped… Furthermore, the AsyncGeneratorModel was never used. That uncovered a bunch of issues, hopefully I've fixed them.

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Great cleanup thank you. The test missing a unittest.TestCase inheritance are a nice catch

@Pierre-Sassoulas Pierre-Sassoulas merged commit a3f5c4a into pylint-dev:main Sep 25, 2024
20 checks passed
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.

3 participants