Skip to content

Commit 6f8c2a9

Browse files
author
zhenwei-li
committed
the checkout test suite
1 parent 3de0009 commit 6f8c2a9

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
# -*- coding:utf-8 -*-
22

3-
from com.dvsnier.git.checkout.checkout import Checkout
3+
import logging
44
import unittest
55

6+
from com.dvsnier.git.branch.branch import Branch
7+
from com.dvsnier.git.checkout.checkout import Checkout
8+
69

710
class Test_Checkout(unittest.TestCase):
811
''' the test checkout '''
12+
913
@classmethod
1014
def setUpClass(cls):
1115
print("...the set up...")
12-
print
16+
print('')
17+
cls._branch = Branch()
18+
cls._branch.set_current_branch_name(cls._branch.get_branch())
1319

1420
def setUp(self):
1521
return super(Test_Checkout, self).setUp()
1622

1723
def test_branch_checkout(self):
1824
branch_checkout = Checkout()
19-
branch_checkout.branch_checkout()
25+
current_branch = Test_Checkout._branch.get_current_branch_name()
26+
logging.debug('the current branch name is {}'.format(current_branch))
27+
branch_checkout.branch_checkout(current_branch)
2028
# branch_checkout.branch_checkout(branch='anonym')
21-
print "the test branch_checkout is succeed."
22-
pass
29+
# print("the test branch_checkout is succeed.")
2330

2431
def tearDown(self):
2532
return super(Test_Checkout, self).tearDown()
2633

2734
@classmethod
2835
def tearDownClass(cls):
29-
print
36+
print('')
3037
print("...the tear down...")
3138

3239

3340
if __name__ == '__main__':
34-
unittest.main()
41+
suite = unittest.TestLoader().loadTestsFromTestCase(Test_Checkout)
42+
unittest.TextTestRunner(verbosity=2).run(suite)

0 commit comments

Comments
 (0)