Пример #1
0
    def test_peek(self):
        if _debug: TestTagList._debug("test_peek")

        tag0 = IntegerTag(0)
        taglist = TagList([tag0])

        # peek at the first tag
        assert tag0 == taglist.Peek()

        # pop of the front
        tag1 = taglist.Pop()
        assert taglist.tagList == []

        # push it back on the front
        taglist.push(tag1)
        assert taglist.tagList == [tag1]