Ejemplo n.º 1
0
def test_move_with_hints_xml():
    aMove = Move(5, 3, MoveDirection.DownRight)
    aMove.addHint('some debug').addHint('more debug')
    expectedXML = lxml.etree.XML(
        """<data class="move" x="5" y="3" direction="DOWN_RIGHT">
  <hint content="some debug" />
  <hint content="more debug" />
</data>""")
    assert lxml.etree.tostring(aMove.toXML(), pretty_print=True) \
        == lxml.etree.tostring(expectedXML, pretty_print=True)
Ejemplo n.º 2
0
def test_hint():
    aMove = Move(1, 3, MoveDirection.Down)
    aMove.addHint('special move')
    assert aMove.hints == ['special move']