summaryrefslogtreecommitdiff
path: root/scss/tests/test_types.py
diff options
context:
space:
mode:
Diffstat (limited to 'scss/tests/test_types.py')
-rw-r--r--scss/tests/test_types.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/scss/tests/test_types.py b/scss/tests/test_types.py
index 48f8223..026be02 100644
--- a/scss/tests/test_types.py
+++ b/scss/tests/test_types.py
@@ -89,6 +89,22 @@ def test_comparison_numeric():
assert not units < plain
assert not units > plain
+ # Incompatible units have... rules.
+ ems = Number(100, "em")
+ pxs = Number(100, "px")
+
+ with pytest.raises(ValueError):
+ ems < pxs
+ with pytest.raises(ValueError):
+ ems > pxs
+ with pytest.raises(ValueError):
+ ems <= pxs
+ with pytest.raises(ValueError):
+ ems >= pxs
+
+ assert not ems == pxs
+ assert ems != pxs
+
def test_comparison_stringerific():
abc = String('abc')