# Path: pygesture/control.py
# CAPABILITIES = [
#     'no-contraction',
#     'elbow-flexion'
#     'elbow-extension',
#     'forearm-pronation',
#     'forearm-supination',
#     'wrist-flexion',
#     'wrist-extension',
#     'open-hand',
#     'closed-fist'
# ]
# class Controller(pipeline.PipelineBlock):
# class LatchController(Controller):
# class DBVRController(Controller):
#     def __init__(self, mapping):
#     def process(self, label):
#     def __init__(self, mapping, latch_labels=[], num_required=1):
#     def process(self, label):
#     def _update_history(self, label):
#     def _check_latch(self, label):
#     def __init__(self, mapping, ramp_length=10, boosts=1):
#     def _reset_values(self):
#     def process(self, data):
#     def _update_gains(self, label):


from pygesture import control


class TestController(object):

    def test(self):
        mapping = {0: 0, 1: 1, 2: 2}
        data = [0]*10 + [1]*2 + [2]*5
        controller = control.Controller(mapping)

        out = _run_controller(controller, data)

        assert out == data


class TestLatchController(object):

    def test(self):
        mapping = {0: 0, 1: 1, 2: 2}
        data = [0]*10 + [1]*2 + [2]*5
        latch_data = [0]*14 + [2]*3


# Path: pygesture/control.py
# CAPABILITIES = [
#     'no-contraction',
#     'elbow-flexion'
#     'elbow-extension',
#     'forearm-pronation',
#     'forearm-supination',
#     'wrist-flexion',
#     'wrist-extension',
#     'open-hand',
#     'closed-fist'
# ]
# class Controller(pipeline.PipelineBlock):
# class LatchController(Controller):
# class DBVRController(Controller):
#     def __init__(self, mapping):
#     def process(self, label):
#     def __init__(self, mapping, latch_labels=[], num_required=1):
#     def process(self, label):
#     def _update_history(self, label):
#     def _check_latch(self, label):
#     def __init__(self, mapping, ramp_length=10, boosts=1):
#     def _reset_values(self):
#     def process(self, data):
#     def _update_gains(self, label):


# Path: pygesture/tests/test_control.py
from pygesture import control



class TestController(object):

    def test(self):
        mapping = {0: 0, 1: 1, 2: 2}
        data = [0]*10 + [1]*2 + [2]*5
        controller = control.Controller(mapping)

        out = _run_controller(controller, data)

        assert out == data


class TestLatchController(object):

    def test(self):
        mapping = {0: 0, 1: 1, 2: 2}
        data = [0]*10 + [1]*2 + [2]*5
        latch_data = [0]*14 + [2]*3


        controller = control.LatchController(