Back to index

moin  1.9.0~rc2
Public Member Functions
test_diff3.TestDiff3 Class Reference

List of all members.

Public Member Functions

def testTextMerge

Detailed Description

Definition at line 11 of file test_diff3.py.


Member Function Documentation

util.diff3.text_merge: test correct merging 

Definition at line 13 of file test_diff3.py.

00013 
00014     def testTextMerge(self):
00015         """ util.diff3.text_merge: test correct merging """
00016         in1 = """AAA 001
00017 AAA 002
00018 AAA 003
00019 AAA 004
00020 AAA 005
00021 AAA 006
00022 AAA 007
00023 AAA 008
00024 AAA 009
00025 AAA 010
00026 AAA 011
00027 AAA 012
00028 AAA 013
00029 AAA 014
00030 """
00031 
00032         in2 = """AAA 001
00033 AAA 002
00034 AAA 005
00035 AAA 006
00036 AAA 007
00037 AAA 008
00038 BBB 001
00039 BBB 002
00040 AAA 009
00041 AAA 010
00042 BBB 003
00043 """
00044 
00045         in3 = """AAA 001
00046 AAA 002
00047 AAA 003
00048 AAA 004
00049 AAA 005
00050 AAA 006
00051 AAA 007
00052 AAA 008
00053 CCC 001
00054 CCC 002
00055 CCC 003
00056 AAA 012
00057 AAA 013
00058 AAA 014
00059 """
00060         result = diff3.text_merge(in1, in2, in3)
00061 
00062         expected = """AAA 001
00063 AAA 002
00064 AAA 005
00065 AAA 006
00066 AAA 007
00067 AAA 008
00068 <<<<<<<<<<<<<<<<<<<<<<<<<
00069 BBB 001
00070 BBB 002
00071 AAA 009
00072 AAA 010
00073 BBB 003
00074 =========================
00075 CCC 001
00076 CCC 002
00077 CCC 003
00078 AAA 012
00079 AAA 013
00080 AAA 014
00081 >>>>>>>>>>>>>>>>>>>>>>>>>
00082 """
00083         assert result == expected, ('Expected "%(expected)s" but got "%(result)s"') % locals()
00084 


The documentation for this class was generated from the following file: