]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-137463: Update `validate_abstract_methods` in `test_collections.py` (#137464)
authorGuilherme Leobas <guilhermeleobas@gmail.com>
Thu, 7 Aug 2025 06:10:56 +0000 (03:10 -0300)
committerGitHub <noreply@github.com>
Thu, 7 Aug 2025 06:10:56 +0000 (09:10 +0300)
commit5be872350d562e6c9987b09ff4b7bda80a2f9cd0
tree8bc8ee909341f279f8aabb3a1697083f00ace9f6
parent3c1471d971ea2759d9de76e22230cd71cf4b7a07
gh-137463: Update `validate_abstract_methods` in `test_collections.py` (#137464)

Update `validate_abstract_methods` in `test_collections.py`

The test for missing abstract methods in `validate_abstract_methods` incorrectly attempted to instantiate the generated class `C` with an argument (`C(name)`), which always raises a `TypeError: C() takes no arguments`. Although the test originally passes, it passes for the wrong reason.

This change makes the test correctly validate the enforcement of abstract methods in ABCs.
Lib/test/test_collections.py