blueloveTH 2 years ago
parent
commit
e5efec6c45
1 changed files with 12 additions and 0 deletions
  1. 12 0
      tests/80_easing.py

+ 12 - 0
tests/80_easing.py

@@ -0,0 +1,12 @@
+import easing
+
+def validate(val):
+    assert -2 <= val <= 2.0
+    assert isinstance(val, float)
+
+for k, f in easing.__dict__.items():
+    if k.startswith("Ease"):
+        validate(f(0.2))
+        validate(f(0.5))
+        validate(f(0.8))
+        validate(f(1.0))