|
1 | 1 | # -*- coding:utf-8 -*- |
2 | 2 |
|
3 | | -from com.dvsnier.git.branch.branch import Branch |
| 3 | +import logging |
4 | 4 | import unittest |
5 | 5 |
|
| 6 | +from com.dvsnier.git.branch.branch import Branch |
| 7 | +from com.dvsnier.git.git import Git |
| 8 | + |
6 | 9 |
|
7 | 10 | class Test_Branch(unittest.TestCase): |
8 | 11 | ''' the test branch ''' |
| 12 | + |
| 13 | + _git = None |
| 14 | + |
9 | 15 | @classmethod |
10 | 16 | def setUpClass(cls): |
11 | 17 | print("...the set up...") |
12 | | - print |
| 18 | + print('') |
| 19 | + cls._git = Git() |
| 20 | + cls._git.config() |
13 | 21 |
|
14 | 22 | def setUp(self): |
15 | | - return super(Test_Branch, self).setUp() |
| 23 | + super(Test_Branch, self).setUp() |
16 | 24 |
|
17 | 25 | def test_get_branch(self): |
18 | 26 | branch = Branch() |
19 | 27 | branch_name = branch.get_branch() |
20 | | - # print(branch_name) |
| 28 | + logging.info(branch_name) |
21 | 29 | 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.") |
23 | 31 |
|
24 | 32 | def test_branch_to_file_and_commit_list(self): |
25 | 33 | branch = Branch() |
26 | 34 | branch_commit_list = branch.branch_to_file_and_commit_list() |
27 | | - # print(branch_commit_list) |
| 35 | + logging.info(branch_commit_list) |
28 | 36 | self.assertIsNotNone(branch_commit_list, |
29 | 37 | '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.") |
31 | 39 |
|
32 | 40 | def test_branch_to_file_and_commit_list_with_more(self): |
33 | 41 | 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) |
37 | 44 | self.assertIsNotNone( |
38 | 45 | branch_commit_list_more, |
39 | 46 | '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.") |
41 | 48 |
|
42 | 49 | def tearDown(self): |
43 | | - return super(Test_Branch, self).tearDown() |
| 50 | + super(Test_Branch, self).tearDown() |
44 | 51 |
|
45 | 52 | @classmethod |
46 | 53 | def tearDownClass(cls): |
47 | | - print |
| 54 | + print('') |
48 | 55 | print("...the tear down...") |
49 | 56 |
|
50 | 57 |
|
|
0 commit comments