Пример #1
0
    def test_set_array_error_dimorder_first(self):
        img_first = Image(TEST_FILE, dimorder="first")

        with self.assertRaises(TypeError):
            img_first.arr = "error"

        with self.assertRaises(ValueError):
            img_first.arr = np.ones(shape=(764, 679, 1))
Пример #2
0
 def test_set_array_error_dimorder_last(self):
     with self.assertRaises(ValueError):
         img_last = Image(TEST_FILE, dimorder="last")
         img_last.arr = np.ones(shape=(1, 764, 679))