When working with 3.3, really should catch both IOError and OSError.
On 2.7, the mac seems to issue an IOError, other platforms an OSError. Just catch both. #123
This commit is contained in:
parent
0c283ddece
commit
b1edfbe296
1 changed files with 1 additions and 1 deletions
|
|
@ -146,7 +146,7 @@ class TestJp2k_2_0(unittest.TestCase):
|
||||||
def test_extra_components_on_v2(self):
|
def test_extra_components_on_v2(self):
|
||||||
"""must error out in 1.x with extra components."""
|
"""must error out in 1.x with extra components."""
|
||||||
# Extra components seems to require 2.0+. Verify that we error out.
|
# Extra components seems to require 2.0+. Verify that we error out.
|
||||||
with self.assertRaises(OSError):
|
with self.assertRaises((IOError, OSError)):
|
||||||
with tempfile.NamedTemporaryFile(suffix='.jp2') as tfile:
|
with tempfile.NamedTemporaryFile(suffix='.jp2') as tfile:
|
||||||
j = Jp2k(tfile.name, 'wb')
|
j = Jp2k(tfile.name, 'wb')
|
||||||
data = np.zeros((128, 128, 4), dtype=np.uint8)
|
data = np.zeros((128, 128, 4), dtype=np.uint8)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue