Skip to content

Commit 72601ad

Browse files
author
zhenwei-li
committed
the branch test suite upgrade
1 parent 69fb246 commit 72601ad

1 file changed

Lines changed: 20 additions & 13 deletions

File tree

tests/com/dvsnier/git/branch/test_branch.py

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,57 @@
11
# -*- coding:utf-8 -*-
22

3-
from com.dvsnier.git.branch.branch import Branch
3+
import logging
44
import unittest
55

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

710
class Test_Branch(unittest.TestCase):
811
''' the test branch '''
12+
13+
_git = None
14+
915
@classmethod
1016
def setUpClass(cls):
1117
print("...the set up...")
12-
print
18+
print('')
19+
cls._git = Git()
20+
cls._git.config()
1321

1422
def setUp(self):
15-
return super(Test_Branch, self).setUp()
23+
super(Test_Branch, self).setUp()
1624

1725
def test_get_branch(self):
1826
branch = Branch()
1927
branch_name = branch.get_branch()
20-
# print(branch_name)
28+
logging.info(branch_name)
2129
self.assertIsNotNone(branch_name, 'test_get_branch is error.')
22-
print "the test get_branch is succeed."
30+
print("the test get_branch is succeed.")
2331

2432
def test_branch_to_file_and_commit_list(self):
2533
branch = Branch()
2634
branch_commit_list = branch.branch_to_file_and_commit_list()
27-
# print(branch_commit_list)
35+
logging.info(branch_commit_list)
2836
self.assertIsNotNone(branch_commit_list,
2937
'test_branch_to_file_and_commit_list is error.')
30-
print "the test branch_to_file_and_commit_list is succeed."
38+
print("the test branch_to_file_and_commit_list is succeed.")
3139

3240
def test_branch_to_file_and_commit_list_with_more(self):
3341
branch = Branch()
34-
branch_commit_list_more = branch.branch_to_file_and_commit_list_with_more(
35-
)
36-
# print(branch_commit_list_more)
42+
branch_commit_list_more = branch.branch_to_file_and_commit_list_with_more()
43+
logging.info(branch_commit_list_more)
3744
self.assertIsNotNone(
3845
branch_commit_list_more,
3946
'test_branch_to_file_and_commit_list_with_more is error.')
40-
print "the test branch_to_file_and_commit_list_with_more is succeed."
47+
print("the test branch_to_file_and_commit_list_with_more is succeed.")
4148

4249
def tearDown(self):
43-
return super(Test_Branch, self).tearDown()
50+
super(Test_Branch, self).tearDown()
4451

4552
@classmethod
4653
def tearDownClass(cls):
47-
print
54+
print('')
4855
print("...the tear down...")
4956

5057

0 commit comments

Comments
 (0)