@@ -21,18 +21,19 @@ def setUp(self):
21
21
def tearDown (self ):
22
22
return
23
23
24
- # def testThreeWayMerge(self):
25
- # """Test merging two commits. Method: Three-Way"""
26
- # testPath = os.path.dirname(os.path.abspath(__file__))
27
- # for d in listdir(testPath):
28
- # if d[0:4] == "Test" and isdir(join(testPath, d)):
29
- # self._merge_test(d, "three-way")
24
+ def testThreeWayMerge (self ):
25
+ """Test merging two commits. Method: Three-Way"""
26
+ testPath = os .path .dirname (os .path .abspath (__file__ ))
27
+ for d in listdir (testPath ):
28
+ if d [0 :4 ] == "Test" and isdir (join (testPath , d )):
29
+ self ._merge_test (d , "three-way" )
30
30
31
31
def testContextMerge (self ):
32
32
"""Test merging two commits. Method: Context"""
33
33
testPath = os .path .dirname (os .path .abspath (__file__ ))
34
+ exceptions = ["TestHouseMerge" ] # TestHouse actually raises a merge conflict exception
34
35
for d in listdir (testPath ):
35
- if d [0 :4 ] == "Test" and isdir (join (testPath , d )):
36
+ if d [0 :4 ] == "Test" and isdir (join (testPath , d )) and d not in exceptions :
36
37
self ._merge_test (d , "context" )
37
38
38
39
def _merge_test (self , dirPath , method ):
@@ -64,7 +65,6 @@ def _merge_test(self, dirPath, method):
64
65
aControllGraphContents = file .read ().split ("---" )
65
66
file .close ()
66
67
resultContent = branchCommit .tree ["graph.nt" ].data .decode ("utf-8" )
67
- print (resultContent )
68
68
resultGraph = rdflib .Graph ().parse (data = resultContent , format = "nt" )
69
69
aResultGraphs = set (iter (aGraphFactory (resultGraph )))
70
70
for aControllGraphContent in aControllGraphContents :
@@ -98,5 +98,6 @@ def expand_branch(self, repo, branch, graphFile):
98
98
repo .state_cleanup ()
99
99
return newCommitOid
100
100
101
+
101
102
if __name__ == '__main__' :
102
103
unittest .main ()
0 commit comments