This is another minor optimization related to now accumulating test
run data as opposed to storing test/result objects. The default
view adds callbacks based on whether it is accumulating test data
or not. This avoids some conditionals in the callbacks b/c we
implicitly know we are accumulating test data or not.
Note: I chose to add these to the view's metaclass (or eigenclass)
to avoid messing with the view's class definition. These callbacks
are specific only to the view instance.
Note: I also chose to no longer override and super the initialize
method and instead just set state in the on_start callback. There
is no advantage to resetting run data on init and the conditional
for setting callbacks can't be called until the on_start anyway
b/c all of the state for the conditions isn't guaranteed until
on_start.
@jcredding ready for review. This should be the last effort on this feature, btw.
This is another minor optimization related to now accumulating test run data as opposed to storing test/result objects. The default view adds callbacks based on whether it is accumulating test data or not. This avoids some conditionals in the callbacks b/c we implicitly know we are accumulating test data or not.
Note: I chose to add these to the view's metaclass (or eigenclass) to avoid messing with the view's class definition. These callbacks are specific only to the view instance.
Note: I also chose to no longer override and super the initialize method and instead just set state in the
on_start
callback. There is no advantage to resetting run data on init and the conditional for setting callbacks can't be called until theon_start
anyway b/c all of the state for the conditions isn't guaranteed untilon_start
.@jcredding ready for review. This should be the last effort on this feature, btw.