Skip to content

Conversation

dbXD320
Copy link
Contributor

@dbXD320 dbXD320 commented Sep 6, 2025

This PR updates three tests in Lib/test/list_tests.py (CommonTest) to consistently use self.type2test instead of directly constructing a list (or []).

test_getitem_error

test_setitem_error

test_constructor_exception_handling

Previously, these tests only applied to the builtin list, and skipped other list-like classes (such as collections.UserList) that reuse CommonTest.

By switching to self.type2test, the tests now correctly apply to all list-like types under test, ensuring consistency across the test suite.

fixes #138584


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

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

Successfully merging this pull request may close these issues.

Lib/tests/list_tests.py is missing type2test in a few methods
2 participants