Skip to content

Commit 8ef5716

Browse files
committed
Add tests
1 parent 83cea58 commit 8ef5716

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/__init__.py

Whitespace-only changes.

tests/test_circle.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import unittest
2+
from mockup.mockup import Circle
3+
4+
5+
class TestCircle(unittest.TestCase):
6+
def test_basics(self):
7+
x = Circle(1)
8+
self.assertEqual(x.radius, 1.0)
9+
self.assertEqual(x.diameter, 2.0)
10+
11+
def test_circumference(self):
12+
x = Circle.from_circumference(19)
13+
self.assertAlmostEqual(x.radius, 19 / (2 * 3.14159))

0 commit comments

Comments
 (0)