mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:30:52 +01:00
[PR #1385] Review/1365 property test discovery #1417
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1417
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1385
Author: @xel1uz
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:review/1365-property-test-discovery📝 Commits (2)
fd0a539tests: the CI registration scan counts the tests a TestCase inherits from a class of its module (TEST-CI-REG-LOCAL-MIXIN)a127418Exclude property-only mixins from unittest registration counts📊 Changes
1 file changed (+80 additions, -5 deletions)
View changed files
📝
tests/test_ci_registration.py(+80 -5)📄 Description
Claimed in the coordination issue as: TEST-CI-REG-LOCAL-MIXIN (original claim by @milk4sale).
Depends on: #1365. This branch includes @milk4sale's support for test methods inherited from a mixin in the same module.
What and why
On #1365, a
TestCasethat inherits only@property def test_label(self)can pass the CI registration check even thoughunittestdiscovers zero tests. The scanner sees thetestprefix on the function definition, but looking up the name on the class returns a property.The follow-up teaches the scanner to recognize
@propertyand its getter, setter, and deleter forms. It adds two cases checked against realunittestdiscovery: an inherited property with a setter contributes zero tests, while an inherited@staticmethod def test_one()contributes one.Tested
fd0a5390: the registration check accepted the property-only mixin, whileunittestcollected zero tests.a1274181, the scanner agreed withunittestin both new cases. Ranpy -3.12 -I tests/test_ci_registration.pyon Windows with Python 3.12.10: all 16 tests passed.py -3.12 -m unittest discover -s tests/semantic -p test_sub_co_same_operand.py -v: all six tests in the module that motivated #1365 passed.git diff --checkandscripts/check_no_game_data.pypassed for the changed file.GPUs tested: n/a (Python test discovery).
AI-assisted: yes, OpenAI Codex.
Checklist
mainat28a32e19.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.