-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYogaTestExercise.py
57 lines (50 loc) · 1.59 KB
/
YogaTestExercise.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# coding: utf-8
# In[12]:
import os,sys, unittest
from yoga.patient import exercise
class TestExercise(unittest.TestCase):
@classmethod
def setUpClass(cls):
print('setupClass')
cls.e1=exercise.Exercise('Nadi Shuddhi', 6)
cls.e1.display()
cls.e2=exercise.Exercise('Bhramari', 3)
cls.e2.display()
@classmethod
def tearDownClass(cls):
print('teardownClass')
del cls.e1
del cls.e2
def setUp(self):
self.e3=exercise.Exercise('Savasana', 4)
self.e4=exercise.Exercise('Surya Namaskar', 15)
self.e5=exercise.Exercise('Halasana', 2)
self.e6=exercise.Exercise('Pavanmuktasana', 3)
self.e7=exercise.Exercise('Tadasana', 2)
self.e3.display()
print('Setup')
def tearDown(self):
print('Teardown')
del self.e3
del self.e4
del self.e5
del self.e6
del self.e7
def test_display(self):
rtn1=self.e3.display()
self.assertEqual(rtn1,0)
rtn1=self.e4.display()
self.assertEqual(rtn1,0)
rtn1=self.e5.display()
self.assertEqual(rtn1,0)
rtn1=self.e6.display()
self.assertEqual(rtn1,0)
rtn1=self.e7.display()
self.assertEqual(rtn1,0)
def test_User1(self):
e1 = exercise.Exercise('Nadi Shuddhi', '12e')
self.assertNotIsInstance(e1.time, int)
def test_User2(self):
e1 =exercise.Exercise( 'a', 250)
self.assertNotEqual(e1.name, 'a')
#unittest.main(argv=[''], verbosity=2, exit=False)