summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWang Xuerui <idontknw.wang@gmail.com>2014-11-01 22:52:09 +0800
committerWang Xuerui <idontknw.wang@gmail.com>2014-11-01 22:52:09 +0800
commitb47eae572342d3f18f0614f7d878b5387cca4553 (patch)
tree2cece30f2794deb64ea84c78a499a9967bc1bd74
parent86712d21fe7c3abdd7e593973fb35010422f1a41 (diff)
downloadpyscss-b47eae572342d3f18f0614f7d878b5387cca4553.tar.gz
Add test cases for modulo expression.
-rw-r--r--scss/tests/test_expression.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scss/tests/test_expression.py b/scss/tests/test_expression.py
index d895948..33adfe2 100644
--- a/scss/tests/test_expression.py
+++ b/scss/tests/test_expression.py
@@ -55,6 +55,11 @@ def test_reference_operations():
assert calc('#{$font-size}/#{$line-height}') == String('12px / 30px')
# uses #{}; does no division
+ # Modulo
+ assert calc('29 % 12') == Number(5)
+ assert calc('29px % 12') == Number(5, 'px')
+ assert calc('29px % 12px') == Number(5, 'px')
+
# Color operations
ns.set_variable('$translucent-red', Color.from_rgb(1, 0, 0, 0.5))
ns.set_variable('$green', Color.from_name('lime'))