Autoinject code? Coverage/performance/others simplification #192
Labels
enhancement
something nice to have but it is not neither critical nor urgent
request for comments
a draft idea that needs more brainstorming, comments are welcome!
Describe the feature you'd like
byexample
allows to run arbitrary code at some points during the execution. These hooks points are described in theConcern
interface.One use case for these concerns/hooks is to enable coverage: the coverage system is initialized at the begin of the execution and at the end it generates a dump with the stats.
An example of this is the coverage.py of
byexample
.Other cases could be:
These are the orthogonal things for what
Concern
was designed for.But creating a
Concern subclass
, implement some of its methods in Python it may be to complex, specially for people coming from other languages.It could be much nicer just say:
But that is perhaps too much for
byexample
.A tradeoff could be:
More cryptic, sure, but more general too:
byexample
could inject a ruby file at the begin and at the end of the execution.byexample
doesn't need to know about coverage/performance/debug/etc and the user doesn't need to know about Python and theConcern
interface.The text was updated successfully, but these errors were encountered: