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])

[((7, 11, 7, 21), 'numpy.any', 'np.any', ({(7, 18, 7, 20): 'im'}, {}), '(im)', True, 'import numpy as np\n'), ((12, 11, 12, 21), 'numpy.any', 'np.any', ({(12, 18, 12, 20): 'im'}, {}), '(im)', True, 'import numpy as np\n'), ((14, 11, 14, 28), 'numpy.any', 'np.any', ({(14, 18, 14, 27): 'im[:, :, (0)]'}, {}), '(im[:, :, (0)])', True, 'import numpy as np\n'), ((15, 11, 15, 28), 'numpy.any', 'np.any', ({(15, 18, 15, 27): 'im[:, :, (1)]'}, {}), '(im[:, :, (1)])', True, 'import numpy as np\n'), ((16, 11, 16, 28), 'numpy.any', 'np.any', ({(16, 18, 16, 27): 'im[:, :, (2)]'}, {}), '(im[:, :, (2)])', True, 'import numpy as np\n')]