Exemplo n.º 1
0
def test_append_with_string_step():
    """Test append with string step."""
    g0 = Traversel('g').addV('hello').and_(Traversel.anonymous().addV('world'))
    g0.append("addV('foo')")
    assert str(g0) == "g.addV('hello').and(addV('world')).addV('foo')"
Exemplo n.º 2
0
def test_append_with_traversel_step():
    """Test append with traversel step."""
    g0 = Traversel('g').addV('hello').and_(Traversel.anonymous().addV('world'))
    g1 = Traversel.anonymous().addV('hello').and_(Traversel.anonymous().addV('world'))
    g0.append(g1)
    assert str(g0) == "g.addV('hello').and(addV('world')).addV('hello').and(addV('world'))"