summaryrefslogtreecommitdiff
path: root/lulua/test_report.py
diff options
context:
space:
mode:
Diffstat (limited to 'lulua/test_report.py')
-rw-r--r--lulua/test_report.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/lulua/test_report.py b/lulua/test_report.py
index 16a751a..448d796 100644
--- a/lulua/test_report.py
+++ b/lulua/test_report.py
@@ -20,7 +20,7 @@
from decimal import Decimal
-from .report import approx
+from .report import approx, blend, blendn
def test_approx ():
assert approx (0) == (Decimal ('0'), '')
@@ -37,4 +37,13 @@ def test_approx ():
assert approx (10**9) == (Decimal ('1'), 'billion')
assert approx (10**12) == (Decimal ('1000'), 'billion')
+def test_blend ():
+ assert blend (0.5, 0, 1) == 0.5
+ assert blend (0.5, 0, 2) == 1
+
+ assert blend (0.1, 0, 1) == 0.1
+ assert blend (0.9, 0, 1) == 0.9
+
+ assert blendn (0.5, (0, ), (1, )) == [0.5]
+ assert blendn (0.5, (0, ), (0.7, ), (1, )) == [0.7]