def test_open(): from mahotas.morph import open np.random.seed(123) A = np.random.random_sample((16,16)) > .345 assert open(A).shape == (16,16)