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

[teyit] Add teyit to the pre-commit hooks #1703

Closed
wants to merge 1 commit into from
Closed

Conversation

Pierre-Sassoulas
Copy link
Member

Steps

  • For new features or bug fixes, add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

Type of Changes

Type
βœ“ πŸ› Bug fix
βœ“ ✨ New feature
βœ“ πŸ”¨ Refactoring
βœ“ πŸ“œ Docs

Related Issue

We have a lot of non-pytest legacy test class in astroid so teyit feels appropriate.

@Pierre-Sassoulas Pierre-Sassoulas added the Maintenance Discussion or action around maintaining astroid or the dev workflow label Jul 11, 2022
@@ -4543,7 +4543,7 @@ def test_lambda(self) -> None:
)
inferred = next(node.infer())
self.assertIsInstance(inferred, nodes.Const)
self.assertIs(inferred.value, False)
self.assertFalse(inferred.value)
Copy link
Member Author

Choose a reason for hiding this comment

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

This one feels wrong because we already check with a specialized function and inferred.value could be falsey.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, this is incorrect, see: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertFalse.

Makes me wonder whether we should really use this.

I have looked into https://github.com/dannysepler/pytestify and similar tools but thought it wasn't worth the churn to apply them.

Copy link
Member Author

Choose a reason for hiding this comment

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

Migrating to pytest's assertions actually make more sense.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2647322599

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.188%

Totals Coverage Status
Change from base Build 2645100812: 0.0%
Covered Lines: 9500
Relevant Lines: 10305

πŸ’› - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining astroid or the dev workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants