def test_key_presses(self): r = RatingScale(self.win) r.markerPlaced = True r.allKeys = ['s'] r.markerPlacedAt = 2 # 1014-1042 r.mouseOnly = False r.skipKeys = ['s'] event._onPygletKey(symbol='s', modifiers=None, emulated=True) r.draw() r.skipKeys = [] r.respKeys = ['s'] r.enableRespKeys = True event._onPygletKey(symbol='s', modifiers=None, emulated=True) r.draw() r.respKeys = [] r = RatingScale(self.win) r.markerPlaced = True r.allKeys = ['s'] r.markerPlacedAt = 2 r.leftKeys = ['s'] event._onPygletKey(symbol='s', modifiers=None, emulated=True) r.draw() r.leftKeys = [] r.rightKeys = ['s'] event._onPygletKey(symbol='s', modifiers=None, emulated=True) r.draw() r.rightKeys = [] r.acceptKeys = ['s'] r.beyondMinTime = True event._onPygletKey(symbol='s', modifiers=None, emulated=True) r.draw()
def test_1019_1029(self): # 1019-1029 r = RatingScale(self.win) r.skipKeys = [] r.mouseOnly = False r.enableRespKeys = True r.respKeys = ['s'] r.allKeys = ['s'] r.tickFromKeyPress = {u's': 1} event._onPygletKey(symbol='s', modifiers=None, emulated=True) r.singleClick = True r.beyondMinTime = True r.draw() r.leftKeys = ['s'] r.draw() r.leftKeys = [] r.rightKeys = ['s'] r.draw() r.rightKeys = []