Skip to content

Commit ff97561

Browse files
Add tests for Turtle.dot signature
1 parent d6d0548 commit ff97561

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Lib/test/test_turtle.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,23 @@ def test_poly_context_when_creating_poly(self):
635635
self.assertTrue(self.turtle._creatingPoly)
636636
self.assertFalse(self.turtle._creatingPoly)
637637

638+
def test_dot_signature(self):
639+
self.turtle.dot()
640+
self.turtle.dot(10)
641+
self.turtle.dot(size=10)
642+
# self.assertRaises(ValueError, self.turtle.dot, 0)
643+
# self.assertRaises(ValueError, self.turtle.dot, -1)
644+
self.turtle.dot((0, 0, 0))
645+
self.turtle.dot(size=(0, 0, 0))
646+
self.turtle.dot("blue")
647+
self.turtle.dot(size="blue")
648+
self.turtle.dot(20, "blue")
649+
self.turtle.dot(20, "blue")
650+
self.turtle.dot(20, (0, 0, 0))
651+
self.turtle.dot(20, 0, 0, 0)
652+
with self.assertRaises(TypeError):
653+
self.turtle.dot(color="blue")
654+
638655

639656
class TestModuleLevel(unittest.TestCase):
640657
def test_all_signatures(self):

0 commit comments

Comments
 (0)