-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunitTest_1.py
More file actions
32 lines (22 loc) · 732 Bytes
/
unitTest_1.py
File metadata and controls
32 lines (22 loc) · 732 Bytes
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
import unittest
from task1 import substract, check_in, check_grater, check_count
class TestNumbers(unittest.TestCase):
def test_true(self):
self.assertTrue(substract(10, 5))
def test_false(self):
self.assertFalse(substract(5, 10))
def test_in(self):
c, d = check_in(15, 10)
self.assertIn(c, d)
def test_notin(self):
c, d = check_in(10,15)
self.assertNotIn(c,d)
def test_greater(self):
self.assertGreater(check_grater(100,20),100)
def test_less(self):
self.assertLess(check_grater(100,20),500)
def test_count(self):
c, d = check_count(10,15)
self.assertCountEqual(c,d)
if __name__ == '__main__':
unittest.main()