Skip to content

qa/cephfs: replace deprecated assertEquals with assertEqual#63323

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

qa/cephfs: replace deprecated assertEquals with assertEqual#63323
vshankar merged 2 commits intoceph:mainfrom
emmanuel-ferdman:main

Conversation

@emmanuel-ferdman
Copy link
Contributor

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

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.

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
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 <emmanuelferdman@gmail.com>
@emmanuel-ferdman emmanuel-ferdman changed the title qa: resolve Python testing warnings qa/cephfs: replace deprecated assertEquals with assertEqual May 18, 2025
Copy link
Contributor

@tchaikov tchaikov left a comment

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
Member

jenkins test api

@joscollin
Copy link
Member

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

@joscollin
Copy link
Member

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

@github-actions
Copy link

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 <emmanuelferdman@gmail.com>
@vshankar
Copy link
Contributor

This PR is under test in https://tracker.ceph.com/issues/71496.

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 <ridave@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
@joscollin
Copy link
Member

jenkins test windows

@joscollin
Copy link
Member

jenkins test make check arm64

@vshankar
Copy link
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
Contributor

jenkins test make check arm64

@vshankar
Copy link
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.

Copy link
Contributor

@vshankar vshankar left a comment

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
12 checks passed
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 <ridave@redhat.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
@batrick
Copy link
Member

batrick commented Feb 26, 2026

this needed a tracker ticket

@batrick
Copy link
Member

batrick commented Feb 26, 2026

@emmanuel-ferdman
Copy link
Contributor Author

emmanuel-ferdman commented Feb 26, 2026

@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