Skip to content

qa/cephfs: replace deprecated assertEquals with assertEqual - #63323

Merged
vshankar merged 2 commits into
ceph:mainfrom
emmanuel-ferdman:main
Jun 20, 2025
Merged

vshankar merged 2 commits into
ceph:mainfrom
emmanuel-ferdman:main

Conversation

@emmanuel-ferdman

@emmanuel-ferdman emmanuel-ferdman commented May 16, 2025 •

Copy link
Copy Markdown
Contributor

The unittest.TestCase.assertEquals() method is deprecated in Python 2.7
and emits a DeprecationWarning. This commit replaces all instances of
assertEquals() with the recommended assertEqual() in the cephfs test files
to resolve these warnings and ensure future compatibility.

This change addresses warnings such as:
DeprecationWarning: Please use assertEqual instead.

Fixes: https://tracker.ceph.com/issues/80333

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

@github-actions github-actions Bot added cephfs Ceph File System tests labels May 16, 2025
Comment thread qa/tasks/cephfs/test_mirroring.py Resolved
The unittest.TestCase.assertEquals() method is deprecated in Python 2.7
and emits a DeprecationWarning. This commit replaces all instances of
assertEquals() with the recommended assertEqual() in the cephfs test files
to resolve these warnings and ensure future compatibility.

This change addresses warnings such as:
DeprecationWarning: Please use assertEqual instead.

Signed-off-by: Emmanuel Ferdman <[email protected]>
@emmanuel-ferdman emmanuel-ferdman changed the title qa: resolve Python testing warnings qa/cephfs: replace deprecated assertEquals with assertEqual May 18, 2025

@tchaikov tchaikov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@joscollin
joscollin requested a review from a team May 19, 2025 05:21
@joscollin

Copy link
Copy Markdown
Member

jenkins test api

@joscollin

Copy link
Copy Markdown
Member

@rishabh-d-dave If you are doing the QA, please add this PR in your next batch.

@joscollin

Copy link
Copy Markdown
Member

@vshankar As informed via slack, please take this for QA.

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

Signed-off-by: Emmanuel Ferdman <[email protected]>
@vshankar

Copy link
Copy Markdown
Contributor

vshankar added a commit to vshankar/ceph that referenced this pull request Jun 9, 2025
* refs/pull/63323/head:
	Merge branch 'main' into main
	qa/cephfs: replace deprecated assertEquals with assertEqual

Reviewed-by: Rishabh Dave <[email protected]>
Reviewed-by: Jos Collin <[email protected]>
Reviewed-by: Kefu Chai <[email protected]>
@joscollin

Copy link
Copy Markdown
Member

jenkins test windows

@joscollin

Copy link
Copy Markdown
Member

jenkins test make check arm64

@vshankar

Copy link
Copy Markdown
Contributor

@vshankar I see that the CI fails but I don't see why. Could you please check it out? thanks 🙌

Possibly unrelated. I will check.

@vshankar

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@vshankar

Copy link
Copy Markdown
Contributor

@vshankar @joscollin looks like all good now

Yes. This is good to go once we get the tests running. We have faced multiple issues lately.

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vshankar
vshankar merged commit e84c562 into ceph:main Jun 20, 2025
vshankar added a commit to vshankar/ceph that referenced this pull request Jun 23, 2025
* refs/pull/63323/head:
	Merge branch 'main' into main
	qa/cephfs: replace deprecated assertEquals with assertEqual

Reviewed-by: Rishabh Dave <[email protected]>
Reviewed-by: Kefu Chai <[email protected]>
Reviewed-by: Jos Collin <[email protected]>
@batrick

batrick commented Feb 26, 2026

Copy link
Copy Markdown
Member

this needed a tracker ticket

@batrick

batrick commented Feb 26, 2026

Copy link
Copy Markdown
Member

@emmanuel-ferdman

emmanuel-ferdman commented Feb 26, 2026 •

Copy link
Copy Markdown
Contributor Author

@batrick Fix already in main via this PR - just needs backport to squid and maybe other branches. Let me know if you prefer me to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants