summaryrefslogtreecommitdiffstats
path: root/share/extensions/tests/test_pixelsnap.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--share/extensions/tests/test_pixelsnap.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/share/extensions/tests/test_pixelsnap.py b/share/extensions/tests/test_pixelsnap.py
new file mode 100644
index 0000000..074abe0
--- /dev/null
+++ b/share/extensions/tests/test_pixelsnap.py
@@ -0,0 +1,36 @@
+# coding=utf-8
+from pixelsnap import PixelSnap
+from inkex.tester import ComparisonMixin, TestCase
+from inkex.tester.filters import CompareOrderIndependentStyle
+
+
+class TestPixelSnapEffectBasic(ComparisonMixin, TestCase):
+ effect_class = PixelSnap
+ compare_filters = [CompareOrderIndependentStyle()]
+ comparisons = [("--id=p1", "--id=r3", "--snap_to=bl")]
+
+
+class TestPixelSnapEffectMM(ComparisonMixin, TestCase):
+ """Test pixel snap in mm based documents"""
+
+ effect_class = PixelSnap
+ compare_file = "svg/pixelsnap_simple.svg"
+ compare_filters = [CompareOrderIndependentStyle()]
+ comparisons = [
+ (
+ "--id=rect1144",
+ "--id=path1302",
+ "--id=path1430",
+ "--id=path1434",
+ "--id=path1434",
+ "--snap_to=tl",
+ ),
+ (
+ "--id=rect1144",
+ "--id=path1302",
+ "--id=path1430",
+ "--id=path1434",
+ "--id=path1434",
+ "--snap_to=bl",
+ ),
+ ]