-
Notifications
You must be signed in to change notification settings - Fork 87
Test registry and matching of handlers by causes #29
Conversation
🤖 zincr found 0 problems , 1 warning
Details on how to resolve are provided below Large CommitsChecks all commits for large additions to a single file. Large commits should be reviewed more carefully for potential copyright and licensing issues This file contains a substantial change, please review to determine if the change comes from an external source and if there are any copyright or licensing issues to be aware of
|
0ed5f28
to
4357765
Compare
Cause() | ||
|
||
|
||
def test_all_args(mocker): |
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.
what's the use of this test? 🤔
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.
To test that all declared (publicly promised) args are accepted, none of them suddenly change their name, none of them are removed.
But mostly for the properties, the same: none are removed or renamed.
Both the class constructor and its properties are considered as part of the public interfaces. And the tests, by concept, should "freeze" the public promises, and they should not change when the code is changed.
Though, maybe there are some other better approaches to do this (freeze the public interface).
These tests "freeze" the public interface of the library regarding the registries and matching of handlers by causes (i.e. resources-events-fields) — to prevent accidental regressions.