Skip to content

Commit c7b1cc4

Browse files
Better test and flake8 fixes.
1 parent 901d0ac commit c7b1cc4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

stage4.1_first_application/pycasa/model/test_image_file.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from unittest import TestCase
33

44
import numpy as np
5-
from numpy.testing import assert_array_equal
65

76
from pycasa.model.image_file import ImageFile
87

@@ -26,5 +25,9 @@ def test_no_image_file(self):
2625
def test_image_metadata(self):
2726
img = ImageFile(filepath=SAMPLE_IMG1)
2827
self.assertNotEqual(img.metadata, {})
28+
for key in ['ExifVersion', 'ExifImageWidth', 'ExifImageHeight']:
29+
self.assertIn(key, img.metadata.keys())
2930
data = img.to_array()
30-
self.assertEqual(data.shape, (768, 1024, 3))
31+
expected_shape = (img.metadata['ExifImageHeight'],
32+
img.metadata['ExifImageWidth'], 3)
33+
self.assertEqual(data.shape, expected_shape)

stage4.1_first_application/pycasa/ui/image_file_view.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# General imports
22
from matplotlib.figure import Figure
3-
import imageio
43

54
# ETS imports
65
from traits.api import Instance, observe

0 commit comments

Comments
 (0)