File tree 3 files changed +9
-2
lines changed
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
- __version__ = "1.6.4 "
1
+ __version__ = "1.7.0 "
Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " imsize"
3
- version = " 1.6.4 "
3
+ version = " 1.7.0 "
4
4
description =" Lightning-fast extraction of basic image metadata"
5
5
authors = [{
name =
" Tomi Aarnio" ,
email =
" [email protected] " }]
6
6
readme = " README.md"
Original file line number Diff line number Diff line change 2
2
import os
3
3
import glob
4
4
import unittest
5
+ import tempfile
5
6
import imsize
6
7
7
8
@@ -146,6 +147,12 @@ def test_orientations(self):
146
147
self .assertEqual (info .nbytes , 600 * 450 * 3 )
147
148
self .assertEqual (info .orientation , (i % 8 ) + 1 )
148
149
150
+ def test_empty_files (self ):
151
+ for ext in imsize .FILETYPES :
152
+ with tempfile .NamedTemporaryFile (suffix = ext ) as fp :
153
+ with self .assertRaises (imsize .ImageFileError ):
154
+ info = imsize .read (fp .name )
155
+
149
156
150
157
if __name__ == "__main__" :
151
158
unittest .main ()
You can’t perform that action at this time.
0 commit comments