-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.py
More file actions
54 lines (43 loc) · 1.33 KB
/
Copy pathexample.py
File metadata and controls
54 lines (43 loc) · 1.33 KB
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
import unittest
import cogent
from cogent.tests import TestCase
from cogent import settings
settings.HTML_TEST_REPORT_FILENAME = "my_test_report.html"
class TestClassOne(TestCase):
def test1(self):
# Pass Test Case
expected_number = 90
actual_number = 90
print('Test output foe test case 1')
self.assertEqual(expected_number, actual_number)
def test2(self):
# Pass Test Case
expected = True
actual = True
print('Test output foe test case 2')
self.assertEqual(expected, actual)
class TestClassTwo(TestCase):
def test1(self):
# Pass Test Case
expected_number = 90
actual_number = 90
print('Test output foe test case 1')
self.assertEqual(expected_number, actual_number)
def test2(self):
# Fail Test Case
expected = True
actual = False
print('Test output foe test case 2')
print('This test is for testing multiple messages')
self.assertEqual(expected, actual)
def test3(self):
# Error Test Case
print('Test output foe test case 3')
raise ValueError('flowid not matches')
@unittest.skip('skipped')
def test4(self):
# Skip Test Case
pass
if __name__ == "__main__":
cogent.main.settings = settings
cogent.main()