From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- share/extensions/tests/test_pixelsnap.py | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 share/extensions/tests/test_pixelsnap.py (limited to 'share/extensions/tests/test_pixelsnap.py') 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", + ), + ] -- cgit v1.2.3