diff options
Diffstat (limited to 'src/argaze.test/GazeFeatures.py')
-rw-r--r-- | src/argaze.test/GazeFeatures.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/argaze.test/GazeFeatures.py b/src/argaze.test/GazeFeatures.py index 4681dbc..8206baf 100644 --- a/src/argaze.test/GazeFeatures.py +++ b/src/argaze.test/GazeFeatures.py @@ -232,6 +232,23 @@ class TestScanStepClass(unittest.TestCase): self.assertEqual(scan_step.last_saccade, saccade) self.assertGreater(scan_step.duration, 0) +def build_scan_path(size): + """Build scan path""" + + scan_path = GazeFeatures.ScanPath() + + for i in range(size): + + fixation = GazeFeatures.Fixation(random_gaze_positions(10)) + ts, _ = fixation.positions.first + scan_path.append_fixation(ts, fixation) + + saccade = GazeFeatures.Saccade(random_gaze_positions(2)) + ts, _ = saccade.positions.first + scan_path.append_saccade(ts, saccade) + + return scan_path + class TestScanPathClass(unittest.TestCase): """Test ScanPath class.""" @@ -352,7 +369,7 @@ class TestAOIScanStepClass(unittest.TestCase): aoi_scan_step = GazeFeatures.AOIScanStep(movements, 'Test') def build_aoi_scan_path(expected_aois, aoi_path): - """Build AOI Scan path""" + """Build AOI scan path""" aoi_scan_path = GazeFeatures.AOIScanPath(expected_aois) |