aboutsummaryrefslogtreecommitdiff
path: root/tests/test_toolkit_frame.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_toolkit_frame.py')
-rw-r--r--tests/test_toolkit_frame.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_toolkit_frame.py b/tests/test_toolkit_frame.py
new file mode 100644
index 0000000..9486227
--- /dev/null
+++ b/tests/test_toolkit_frame.py
@@ -0,0 +1,14 @@
+import numpy
+from avp.toolkit.frame import BlankFrame, FloodFrame
+
+
+def test_blank_frame():
+ """BlankFrame creates a frame of all zeros"""
+ assert numpy.asarray(BlankFrame(1920, 1080), dtype="int32").sum() == 0
+
+
+def test_flood_frame():
+ """FloodFrame given (1, 1, 1, 1) creates a frame of sum 1920 * 1080 * 4"""
+ assert numpy.asarray(FloodFrame(1920, 1080, (1, 1, 1, 1)), dtype="int32").sum() == (
+ 1920 * 1080 * 4
+ )