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 pytest warnings #3084

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Fix pytest warnings #3084

merged 1 commit into from
Mar 7, 2024

Conversation

narrieta
Copy link
Member

@narrieta narrieta commented Mar 7, 2024

Fixing pytest warnings; most of them were due to strings representing regular expressions missing the 'r' prefix (we were suppressing those from pylint).

@@ -6,7 +6,7 @@
from tests.lib.tools import AgentTestCase, clear_singleton_instances


class TestClassToTestSingletonPerThread(SingletonPerThread):
Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed this, since pytest was identifying it as a Test class

@@ -156,8 +156,6 @@ def setUpClass(cls):
cls.assertIsNone = cls.emulate_assertIsNone
if not hasattr(cls, "assertIsNotNone"):
cls.assertIsNotNone = cls.emulate_assertIsNotNone
if hasattr(cls, "assertRaisesRegexp"):
Copy link
Member Author

Choose a reason for hiding this comment

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

I guess this was needed for some old Python versions, but it is no longer needed, and it is producing a warning about assertRaisesRegexp being deprecated.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 52.17391% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 71.89%. Comparing base (d79ab7f) to head (70fea51).

Files Patch % Lines
azurelinuxagent/pa/rdma/ubuntu.py 0.00% 5 Missing ⚠️
azurelinuxagent/common/osutil/freebsd.py 0.00% 2 Missing ⚠️
azurelinuxagent/pa/rdma/rdma.py 0.00% 2 Missing ⚠️
azurelinuxagent/common/version.py 85.71% 1 Missing ⚠️
azurelinuxagent/pa/rdma/centos.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3084   +/-   ##
========================================
  Coverage    71.89%   71.89%           
========================================
  Files          110      110           
  Lines        16395    16395           
  Branches      2342     2342           
========================================
  Hits         11788    11788           
  Misses        4055     4055           
  Partials       552      552           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@narrieta narrieta merged commit c96a7f4 into Azure:develop Mar 7, 2024
12 of 13 checks passed
@narrieta narrieta deleted the pytest-warn branch March 7, 2024 22:44
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