-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix add_class_trait in the presence of subclasses #1461
Conversation
The culprit is test_abc.py, in combination with issue #58: traits/traits/tests/test_abc.py Line 33 in 249d648
|
The documentation build issue that's causing the CI to fail on this PR should be fixed in #1462. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While orthogonal to main idea of the PR, there aren't tests for the is_subclass
behaviour where there is an error as described in the new docstring for _add_class_trait
.
Otherwise LGTM.
Yes, that should be fixed. (Though the use of |
Though I guess I've already done that by documenting it. :-( |
Tests added. |
Co-authored-by: Corran Webster <cwebster@enthought.com>
This PR fixes the issue described in #1460, and adds some tests for
add_class_trait
. Prior to this PR, there were no tests at all foradd_class_trait
.The PR also does a drive-by fix of a bug involving prefix traits and an invalid use of
sort
, leading to the errorTypeError: sort() takes no positional arguments
.Unfortunately, one of the newly added tests is failing as part of the full test suite, but passing standalone. It appears that we have a test interaction - some test somewhere in the test suite is mutating the class traits on
HasTraits
. I'll try to track it down.Checklist
docs/source/traits_api_reference
) N/Adocs/source/traits_user_manual
) N/Atraits-stubs
N/A