Source

pyyaml / tests / test_structure.py

Diff from to

tests/test_structure.py

                 return True
             else:
                 return None
-        elif parser.check(SequenceEvent):
+        elif parser.check(SequenceStartEvent):
             parser.get()
             sequence = []
-            while not parser.check(CollectionEndEvent):
+            while not parser.check(SequenceEndEvent):
                 sequence.append(self._convert(parser))
             parser.get()
             return sequence
-        elif parser.check(MappingEvent):
+        elif parser.check(MappingStartEvent):
             parser.get()
             mapping = []
-            while not parser.check(CollectionEndEvent):
+            while not parser.check(MappingEndEvent):
                 key = self._convert(parser)
                 value = self._convert(parser)
                 mapping.append((key, value))
                 #self.failUnlessEqual(event1.anchor, event2.anchor)
                 #self.failUnlessEqual(event1.tag, event2.tag)
                 self.failUnlessEqual(event1.value, event2.value)
-            if isinstance(event1, CollectionEvent):
+            if isinstance(event1, CollectionStartEvent):
                 #self.failUnlessEqual(event1.anchor, event2.anchor)
                 #self.failUnlessEqual(event1.tag, event2.tag)
                 pass
                 self.failUnlessEqual(event1.anchor, event2.anchor)
                 self.failUnlessEqual(event1.tag, event2.tag)
                 self.failUnlessEqual(event1.value, event2.value)
-            if isinstance(event1, CollectionEvent):
+            if isinstance(event1, CollectionStartEvent):
                 self.failUnlessEqual(event1.anchor, event2.anchor)
                 self.failUnlessEqual(event1.tag, event2.tag)