File tree Expand file tree Collapse file tree
tests/com/dvsnier/process Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # -*- coding:utf-8 -*-
Original file line number Diff line number Diff line change 1+ # -*- coding:utf-8 -*-
2+
3+ import unittest
4+ from com .dvsnier .process .execute import execute , trace
5+
6+
7+ class Test_Execute (unittest .TestCase ):
8+ ''' the test execute '''
9+ @classmethod
10+ def setUpClass (cls ):
11+ print ("...the set up..." )
12+ print
13+
14+ def setUp (self ):
15+ return super (Test_Execute , self ).setUp ()
16+
17+ def test_execute (self ):
18+ 'the test execute'
19+ # cmds = ["git config --local --list"]
20+ # cmds = ["git config --local --list", "grep \"user\""]
21+ cmds = ["git config --local --list" , "grep \" user\" " , "grep \" @\" " ]
22+ result = execute (cmds , quiet = False )
23+ self .assertIsNotNone (result , 'test_execute is error.' )
24+ print (result )
25+
26+ def test_trace (self ):
27+ 'the test trace'
28+ # cmds = ["git config --local --list"]
29+ # cmds = ["git config --local --list", "grep \"user\""]
30+ cmds = ["git config --local --list" , "grep \" user\" " , "grep \" @\" " ]
31+ trace (cmds )
32+
33+ def tearDown (self ):
34+ return super (Test_Execute , self ).tearDown ()
35+
36+ @classmethod
37+ def tearDownClass (cls ):
38+ print
39+ print ("...the tear down..." )
40+
41+
42+ if __name__ == '__main__' :
43+ unittest .main ()
You can’t perform that action at this time.
0 commit comments