Skip to content
Snippets Groups Projects
Commit 49f986e7 authored by Guido Trotter's avatar Guido Trotter
Browse files

TestSingleFileEventHandler: abstract notifier type


Rather than hardcode that we have two notifiers, and notifier 0 is the
terminating one, we abstract this with class level constants. This makes
it easier to add more, with different features.

The only real change is that now the callback class takes as input the
whole test object, rather than just the notified array, to have access
to those constants.

The rest is just replacing of hardcoded 0s and 1s with
self.NOTIFIER_TERM and self.NOTIFIER_NORM, and of notifier_count with
len(self.NOTIFIERS).

Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
parent f59dce3e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment