import numpy as np
from imread import imread
from . import file_path

def test_read():
    im = imread(file_path('star1.bmp'))
    assert np.any(im)
    assert im.shape == (128, 128, 3)

def test_indexed():
    im = imread(file_path('py-installer-indexed.bmp'))
    assert np.any(im)
    assert im.shape == (352, 162, 3)
    assert np.any(im[:,:,0])
    assert np.any(im[:,:,1])
    assert np.any(im[:,:,2])

[((138, 148), 'numpy.any', 'np.any', (['im'], {}), '(im)\n', (144, 148), True, 'import numpy as np\n'), ((273, 283), 'numpy.any', 'np.any', (['im'], {}), '(im)\n', (279, 283), True, 'import numpy as np\n'), ((332, 353), 'numpy.any', 'np.any', (['im[:, :, (0)]'], {}), '(im[:, :, (0)])\n', (338, 353), True, 'import numpy as np\n'), ((361, 382), 'numpy.any', 'np.any', (['im[:, :, (1)]'], {}), '(im[:, :, (1)])\n', (367, 382), True, 'import numpy as np\n'), ((390, 411), 'numpy.any', 'np.any', (['im[:, :, (2)]'], {}), '(im[:, :, (2)])\n', (396, 411), True, 'import numpy as np\n')]