pyunit
works by looking for classes subclassing unittest.TestCase
and methods starting with the string test
.
What is that pattern called? Is it a form for the decorator pattern? Discovery? Introspection? Enumeration?
I know other systems use similar as well. For example, I think JavaBeans uses a similar naming pattern for exposing what they can do, rather than having to explicitly call a method for a list of stuff.
Aucun commentaire:
Enregistrer un commentaire