aboutsummaryrefslogtreecommitdiff
path: root/python/pyarmnn/examples/common/tests/test_utils.py
diff options
context:
space:
mode:
authorÉanna Ó Catháin <eanna.ocathain@arm.com>2020-11-16 14:12:11 +0000
committerJim Flynn <jim.flynn@arm.com>2020-11-17 12:23:56 +0000
commit145c88f851d12d2cadc2f080d232c1d5963d6e47 (patch)
tree6ae197d74782cd2c7ef8965f4b36acabc65ce453 /python/pyarmnn/examples/common/tests/test_utils.py
parentaa41d5d2f43790938f3a32586626be5ef55b6ca9 (diff)
downloadarmnn-145c88f851d12d2cadc2f080d232c1d5963d6e47.tar.gz
MLECO-1253 Adding ASR sample application using the PyArmNN api
Change-Id: I450b23800ca316a5bfd4608c8559cf4f11271c21 Signed-off-by: Éanna Ó Catháin <eanna.ocathain@arm.com>
Diffstat (limited to 'python/pyarmnn/examples/common/tests/test_utils.py')
-rw-r--r--python/pyarmnn/examples/common/tests/test_utils.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/python/pyarmnn/examples/common/tests/test_utils.py b/python/pyarmnn/examples/common/tests/test_utils.py
new file mode 100644
index 0000000000..28d68ea235
--- /dev/null
+++ b/python/pyarmnn/examples/common/tests/test_utils.py
@@ -0,0 +1,19 @@
+# Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+# SPDX-License-Identifier: MIT
+
+import os
+
+from context import cv_utils
+from context import utils
+
+
+def test_get_source_encoding(test_data_folder):
+ video_file = os.path.join(test_data_folder, "Megamind.avi")
+ video, video_writer, frame_count = cv_utils.init_video_file_capture(video_file, "/tmp")
+ assert cv_utils.get_source_encoding_int(video) == 1145656920
+
+
+def test_read_existing_labels_file(test_data_folder):
+ label_file = os.path.join(test_data_folder, "labelmap.txt")
+ labels_map = utils.dict_labels(label_file)
+ assert labels_map is not None