Skip to content

Commit 55ba8ca

Browse files
committed
Test Workplane.split error when no side kept
1 parent cd3f1c8 commit 55ba8ca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_cadquery.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,13 +2189,15 @@ def testSplitKeepingBottom(self):
21892189
self.assertEqual(8, result.solids().item(0).faces().size())
21902190

21912191
def testSplitError(self):
2192-
"""
2193-
Test split produces the correct error when called with no solid to split.
2194-
"""
2192+
# Test split produces the correct error when called with no solid to split.
21952193
w = Workplane().hLine(1).vLine(1).close()
21962194
with raises(ValueError):
21972195
w.split(keepTop=True)
21982196

2197+
# Split should raise ValueError when called with no side kept
2198+
with raises(ValueError):
2199+
w.split(keepTop=False, keepBottom=False)
2200+
21992201
def testBoxDefaults(self):
22002202
"""
22012203
Tests creating a single box

0 commit comments

Comments
 (0)