Skip to content

[tests] Fix test failures with Python 3.12 #953#954

Closed
dee077 wants to merge 1 commit into
openwisp:masterfrom
dee077:issues/953-test-failures-with-python-3.12
Closed

[tests] Fix test failures with Python 3.12 #953#954
dee077 wants to merge 1 commit into
openwisp:masterfrom
dee077:issues/953-test-failures-with-python-3.12

Conversation

@dee077

@dee077 dee077 commented Dec 23, 2024

Copy link
Copy Markdown
Member

Tests are failing on Python 3.12 due to:

  1. Removal of assertDictContainsSubset.
  2. Deprecation of assertEquals (now replaced by assertEqual).

Fixes #953

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.

Reference to Existing Issue

Closes #953

Description of Changes

Replaced assertEquals with assertEqual and assertDictContainsSubset with for loop to check all key-value pairs.

Replaced assertEquals with assertEqual and assertDictContainsSubset with for loop to check all key-value pairs.

Fixes openwisp#953
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 98.261%. remained the same
when pulling 87598e3 on dee077:issues/953-test-failures-with-python-3.12
into aa08611 on openwisp:master.

@nemesifier

Copy link
Copy Markdown
Member

Closing because it was handled in #987.

@nemesifier nemesifier closed this Apr 10, 2025
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.

[tests] Test Failures with Python 3.12: assertDictContainsSubset and assertEquals Deprecation

3 participants