Exemplo n.º 1
0
def test_image_load():
    img = _buildimg()
    assert 'protein' not in img.channeldata
    img.load()
    assert img.loaded

    assert 'dna' not in img.channeldata
    img_direct = readimg(protimg)
    assert numpy.all(img_direct == img.channeldata['protein'])

    img.unload()
    assert not img.loaded
    assert 'protein' not in img.channeldata
    assert 'dna' not in img.channeldata
Exemplo n.º 2
0
def test_readimg():
    img = readimg(protimg)
    assert img.shape == (1024, 1344)