aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test/GazeAnalysis/TransitionMatrix.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/argaze.test/GazeAnalysis/TransitionMatrix.py')
-rw-r--r--src/argaze.test/GazeAnalysis/TransitionMatrix.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/argaze.test/GazeAnalysis/TransitionMatrix.py b/src/argaze.test/GazeAnalysis/TransitionMatrix.py
index 14a34ce..997b706 100644
--- a/src/argaze.test/GazeAnalysis/TransitionMatrix.py
+++ b/src/argaze.test/GazeAnalysis/TransitionMatrix.py
@@ -18,17 +18,18 @@ GazeFeaturesTest = MiscFeatures.importFromTestPackage('GazeFeatures')
class TestAOIScanPathAnalyzer(unittest.TestCase):
"""Test AOIScanPathAnalyzer class."""
- def test_analyse(self):
- """Test analyse method."""
-
- aoi_scan_path = GazeFeaturesTest.build_aoi_scan_path(['Foo', 'Bar', 'Shu'], ['Bar', 'Shu', 'Foo', 'Bar'])
-
+ def test_analyze(self):
+ """Test analyze method."""
+
transition_matrix_analyser = TransitionMatrix.AOIScanPathAnalyzer()
- transition_matrix_probabilities, transition_matrix_density = transition_matrix_analyser.analyze(aoi_scan_path)
+
+ aoi_scan_path = GazeFeaturesTest.build_aoi_scan_path(['Foo', 'Bar', 'Shu'], ['Bar', 'Shu', 'Foo', 'Bar'])
# Check aoi scan path
self.assertEqual(len(aoi_scan_path), 4)
+ transition_matrix_probabilities, transition_matrix_density = transition_matrix_analyser.analyze(aoi_scan_path)
+
# Check transition matrix probabilities ([destination][departure])
self.assertEqual(transition_matrix_probabilities['Foo']['Foo'], 0)
self.assertEqual(transition_matrix_probabilities['Bar']['Bar'], 0)