summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorcapellancitizen <thecapellancitizen@gmail.com>2024-04-23 18:09:32 -0400
committerGitHub <noreply@github.com>2024-04-23 18:09:32 -0400
commitcca25ba679d2ddf23eb4ff5c0d00fb5d14e2fdff (patch)
tree159cc854805800c148eadc6da15663351936ca65 /tests
parent275843c2b27cabe1547f09498694b7e2174eda5e (diff)
Clean-up of clone code (#2851)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_clone.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_clone.py b/tests/test_clone.py
index d8e64c9c..6ebb0796 100644
--- a/tests/test_clone.py
+++ b/tests/test_clone.py
@@ -34,6 +34,22 @@ class CloneElementTest(TestCase):
stitch_groups = clone.to_stitch_groups(None)
self.assertEqual(len(stitch_groups), 0)
+ def test_not_clone(self):
+ root: SvgDocumentElement = svg()
+ rect = root.add(Rectangle(attrib={
+ "width": "10",
+ "height": "10",
+ INKSTITCH_ATTRIBS["angle"]: "30"
+ }))
+ use = root.add(Use(attrib={
+ INKSTITCH_ATTRIBS["clone"]: "false"
+ }))
+ use.href = rect
+
+ clone = Clone(use)
+ stitch_groups = clone.to_stitch_groups(None)
+ self.assertEqual(len(stitch_groups), 0)
+
# These tests make sure the element cloning works as expected, using the `clone_elements` method.
def test_basic(self):