Skip to content

Commit 14f3263

Browse files
author
zhenwei-li
committed
the pull test suite
1 parent 10bd0dd commit 14f3263

2 files changed

Lines changed: 17 additions & 11 deletions

File tree

src/com/dvsnier/git/pull/pull.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ def __init__(self):
1212

1313
def fast_foward(self):
1414
'the execute git pull origin option'
15-
return execute(['git pull origin'])
15+
return execute(['git pull --ff --stat origin'])
Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,40 @@
11
# -*- coding:utf-8 -*-
22

3-
from com.dvsnier.git.pull.pull import Pull
3+
import logging
44
import unittest
55

6+
from com.dvsnier.git.git import Git
7+
from com.dvsnier.git.pull.pull import Pull
8+
69

710
class Test_Pull(unittest.TestCase):
811
''' the test pull '''
912
@classmethod
1013
def setUpClass(cls):
1114
print("...the set up...")
12-
print
15+
print('')
16+
cls._git = Git()
17+
cls._git.config()
18+
cls._pull = Pull()
1319

1420
def setUp(self):
15-
return super(Test_Pull, self).setUp()
21+
super(Test_Pull, self).setUp()
1622

1723
def test_fast_foward(self):
18-
pull = Pull()
19-
pull_fast_foward = pull.fast_foward()
24+
pull_fast_foward = Test_Pull._pull.fast_foward()
2025
self.assertIsNotNone(pull_fast_foward, 'test_fast_foward is error.')
21-
print "the test fast_foward is succeed."
22-
pass
26+
logging.debug(pull_fast_foward)
27+
# print("the test fast_foward is succeed.")
2328

2429
def tearDown(self):
25-
return super(Test_Pull, self).tearDown()
30+
super(Test_Pull, self).tearDown()
2631

2732
@classmethod
2833
def tearDownClass(cls):
29-
print
34+
print('')
3035
print("...the tear down...")
3136

3237

3338
if __name__ == '__main__':
34-
unittest.main()
39+
suite = unittest.TestLoader().loadTestsFromTestCase(Test_Pull)
40+
unittest.TextTestRunner(verbosity=2).run(suite)

0 commit comments

Comments
 (0)