Exemplo n.º 1
0
def test_node_set_pixmap(mod, molecule):
    """Check that setPixmap successfully change pixmap."""

    node = mod.Node(32)
    assert node.pixmap().isNull()
    pixmap = QPixmap(molecule['image'])
    node.setPixmap(pixmap)
    p = node.pixmap()
    assert not p.isNull()
    assert p.size() == pixmap.size()
    assert p.cacheKey() == pixmap.cacheKey()