~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to testknit.py

  • Committer: Martin Pool
  • Date: 2005-06-27 03:34:57 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mbp@sourcefrog.net-20050627033457-4d2c0d1ef375211f
Another test for version inclusion

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
        k.dump(self.TEST_LOG)
117
117
 
118
118
 
 
119
class DivergedIncludes(TestBase):
 
120
    """Knit with two diverged texts based on version 0.
 
121
    """
 
122
    def runTest(self):
 
123
        k = Knit()
 
124
 
 
125
        k._v = [((),),
 
126
                ((0,),),
 
127
                ((0,),),]
 
128
        k._l = [(0, "first line"),
 
129
                (1, "second line"),
 
130
                (2, "alternative second line"),]
 
131
 
 
132
        self.assertEqual(k.get(0),
 
133
                         ["first line"])
 
134
 
 
135
        self.assertEqual(k.get(1),
 
136
                         ["first line",
 
137
                          "second line"])
 
138
 
 
139
        self.assertEqual(k.get(2),
 
140
                         ["first line",
 
141
                          "alternative second line"])
 
142
 
119
143
def testknit():
120
144
    import testsweet
121
145
    from unittest import TestSuite, TestLoader