-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathCommandLine.py
More file actions
39 lines (30 loc) · 818 Bytes
/
Copy pathCommandLine.py
File metadata and controls
39 lines (30 loc) · 818 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
33
34
35
36
37
38
39
'''
Created on 05-Jul-2020
@author: venkateshwara D
'''
import unittest
import sys
class MyTest(unittest.TestCase):
def setUp(self):
self.a = sys.argv[1]
def runTest(self):
self.assertEqual(self.a, "1")
unittest.TextTestRunner().run(MyTest())
'''
In CMD
cd full path to python
python CommandLine.py 2
======================================================================
FAIL: runTest (__main__.MyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "CommandLine.py", line 13, in runTest
self.assertEqual(self.a, "1")
AssertionError: '2' != '1'
- 2
+ 1
python CommandLine.py 1
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
'''