From 25265750a82045a236c85fba81e0c12175224c0b Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 29 Oct 2024 19:07:45 +0100 Subject: [PATCH] fix test --- src/source/extract.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/source/extract.rs b/src/source/extract.rs index 02c03018..6a03c366 100644 --- a/src/source/extract.rs +++ b/src/source/extract.rs @@ -229,8 +229,11 @@ mod test { fn test_extract_fail() { let fancy_log = LoggingOutputHandler::default(); let tempdir = tempfile::tempdir().unwrap(); - let res = extract_zip("", tempdir.path(), &fancy_log); - assert!(matches!(res.err(), Some(SourceError::FileNotFound(_)))); + let result = extract_zip("", tempdir.path(), &fancy_log); + assert!(matches!( + result, + Err(SourceError::Io(e)) if e.kind() == std::io::ErrorKind::NotFound + )); } #[test]