diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
commit | cca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch) | |
tree | 146f39ded1c938019e1ed42d30923c2ac9e86789 /share/extensions/tests/test_voronoi2svg.py | |
parent | Initial commit. (diff) | |
download | inkscape-upstream/1.2.2.tar.xz inkscape-upstream/1.2.2.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | share/extensions/tests/test_voronoi2svg.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/share/extensions/tests/test_voronoi2svg.py b/share/extensions/tests/test_voronoi2svg.py new file mode 100644 index 0000000..5a26adc --- /dev/null +++ b/share/extensions/tests/test_voronoi2svg.py @@ -0,0 +1,53 @@ +# coding=utf-8 +from voronoi2svg import Voronoi +from inkex.tester import ComparisonMixin, TestCase +from inkex.tester.filters import CompareOrderIndependentStyle + + +class TestVoronoi2svgBasic(ComparisonMixin, TestCase): + effect_class = Voronoi + compare_filters = [CompareOrderIndependentStyle()] + comparisons = [ + ( + "--id=c1", + "--id=c2", + "--id=c3", + "--id=p1", + "--id=p2", + "--id=s1", + "--id=u1", + "--diagram-type=Both", + "--clip-box=Automatic from seeds", + "--show-clip-box=True", + ), + ( + "--id=c1", + "--id=c2", + "--id=c3", + "--id=p1", + "--id=p2", + "--id=s1", + "--diagram-type=Voronoi", + "--clip-box=Page", + ), + ( + "--id=r1", + "--id=r3", + "--id=c1", + "--id=c3", + "--id=s1", + "--diagram-type=Both", + "--delaunay-fill-options=delaunay-fill", + ), + ] + + +class TestVoronoi2svgmm(ComparisonMixin, TestCase): + """Test voronoi for mm based documents (https://gitlab.com/inkscape/extensions/-/issues/403)""" + + effect_class = Voronoi + compare_file = "svg/interp_shapes.svg" + comparisons = [ + tuple(f"--id=path{i}" for i in range(1, 11)) + + ("--diagram-type=Voronoi", "--clip-box=Page") + ] |