Skip to content

gh-71339: Add additional assertion methods for unittest#128707

Merged
serhiy-storchaka merged 7 commits intopython:mainfrom
serhiy-storchaka:extra-assertions
Jan 14, 2025
Merged

gh-71339: Add additional assertion methods for unittest#128707
serhiy-storchaka merged 7 commits intopython:mainfrom
serhiy-storchaka:extra-assertions

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jan 10, 2025

Add the following methods:

  • assertHasAttr() and assertNotHasAttr()
  • assertIsSubclass() and assertNotIsSubclass()
  • assertStartsWith() and assertNotStartsWith()
  • assertEndsWith() and assertNotEndsWith()

Also improve error messages for assertIsInstance() and assertNotIsInstance().


📚 Documentation preview 📚: https://cpython-previews--128707.org.readthedocs.build/

Loading
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.

7 participants