Skip to content

Commit 08f0d37

Browse files
committed
Add test for opening non existent file
1 parent afa8170 commit 08f0d37

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/test_basic.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,11 @@ def testCorruptFile():
310310
with pytest.raises(rawpy.LibRawDataError):
311311
im.extract_thumb()
312312

313+
def testOpenNonExistentFile():
314+
with pytest.raises(rawpy.LibRawIOError):
315+
with rawpy.open("nonexistent.nef") as f:
316+
pass
317+
313318
def print_stats(rgb):
314319
print(rgb.dtype,
315320
np.min(rgb, axis=(0,1)), np.max(rgb, axis=(0,1)), # range for each channel

0 commit comments

Comments
 (0)