Ejemplo n.º 1
0
 def test_parse_triply_embedded_list(self):
     expected = list_node([list_node([list_node([])])])
     assert parse(["l", "l", "l", "e", "e", "e"]) == expected
Ejemplo n.º 2
0
 def test_parse_integer_list_children(self):
     assert parse(["l", "i0e", "e"]).children == [node("i0e")]
Ejemplo n.º 3
0
 def test_parse_embedded_list(self):
     assert parse(["l", "l", "e", "e"]) == list_node([list_node([])])
Ejemplo n.º 4
0
 def test_parse_empty_list_children(self):
     result = parse(["l", "e"])
     assert result.children == []
Ejemplo n.º 5
0
    def test_parse_list_with_integer(self):
        expected = list_node([])
        expected.children.append(node("i0e"))

        assert parse(["l", "i0e", "e"]) == expected
	def test_parse_empty_list(self):
		assert parse(["l", "e"]) == list_node([])
Ejemplo n.º 7
0
 def test_parse_empty_list(self):
     assert parse(["l", "e"]) == list_node([])
	def test_emit_list_with_integer(self):
		assert emit(parse(["l", "i0e", "e"])) == [0]
	def test_emit_embedded_list(self):
		assert emit(parse(["l", "l", "e", "e"])) == [[]]
	def test_parse_embedded_list(self):
		assert parse(["l", "l", "e", "e"]) == list_node([list_node([])])
	def test_parse_triply_embedded_list(self):
		expected = list_node([list_node([list_node([])])])
		assert parse(["l", "l", "l", "e", "e", "e"]) == expected
	def test_parse_integer_list_children(self):
		assert parse(["l", "i0e", "e"]).children == [node("i0e")]
	def test_parse_list_with_integer(self):
		expected = list_node([])
		expected.children.append(node("i0e"))

		assert parse(["l", "i0e", "e"]) == expected
	def test_parse_empty_list_children(self):
		result = parse(["l", "e"])
		assert result.children == []
Ejemplo n.º 15
0
 def test_emit_list_with_integer(self):
     assert emit(parse(["l", "i0e", "e"])) == [0]
Ejemplo n.º 16
0
 def test_parse_integer(self):
     assert parse(["i0e"]) == node("i0e")
Ejemplo n.º 17
0
 def test_emit_embedded_list(self):
     assert emit(parse(["l", "l", "e", "e"])) == [[]]
	def test_parse_integer(self):
		assert parse(["i0e"]) == node("i0e")