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 deprecated-method warnings for "assertEquals" #1995

Merged
merged 4 commits into from
Aug 31, 2020

Conversation

pgombar
Copy link
Contributor

@pgombar pgombar commented Aug 26, 2020

Description

Replace assertEquals with assertEqual since the former is deprecated according to pylint.


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and Travis.CI is passing.

Quality of Code and Contribution Guidelines

Copy link
Contributor

@kevinclark19a kevinclark19a left a comment

Choose a reason for hiding this comment

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

Everything here looks good, but I think you've missed some of the error suppressions. I used this regex on your branch to find them:

# pylint disable=.*(?:deprecated-method|W1505)

Here are the three I found:

/home/kevinclark19a/dev/WALinuxAgent/azurelinuxagent/common/future.py:53
/home/kevinclark19a/dev/WALinuxAgent/azurelinuxagent/common/future.py:66
/home/kevinclark19a/dev/WALinuxAgent/azurelinuxagent/common/version.py:90

I think the issue here was that these use the error code (W1505) instead of the symbol (deprecated-method).

@pgombar
Copy link
Contributor Author

pgombar commented Aug 27, 2020

Everything here looks good, but I think you've missed some of the error suppressions. I used this regex on your branch to find them:

# pylint disable=.*(?:deprecated-method|W1505)

Here are the three I found:

/home/kevinclark19a/dev/WALinuxAgent/azurelinuxagent/common/future.py:53
/home/kevinclark19a/dev/WALinuxAgent/azurelinuxagent/common/future.py:66
/home/kevinclark19a/dev/WALinuxAgent/azurelinuxagent/common/version.py:90

I think the issue here was that these use the error code (W1505) instead of the symbol (deprecated-method).

Correct, but if you take a closer look at what these are, you will find that the suppression should stay there since we are not changing that code.

Copy link
Contributor

@kevinclark19a kevinclark19a left a comment

Choose a reason for hiding this comment

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

Awesome! Yep, that checks out.

@pgombar pgombar merged commit f1222f8 into Azure:develop Aug 31, 2020
@pgombar pgombar deleted the fix_asserts branch August 31, 2020 17:32
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