From 893faa66040458df7cde72fa731b97680b5cb1fe Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 12 Oct 2019 21:34:31 +0200 Subject: [PATCH] Fix a test for png's lightweight cleaning on corrupted files --- tests/test_corrupted_files.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_corrupted_files.py b/tests/test_corrupted_files.py index 1d66556..7f8e223 100644 --- a/tests/test_corrupted_files.py +++ b/tests/test_corrupted_files.py @@ -194,10 +194,9 @@ class TestCorruptedFiles(unittest.TestCase): os.remove('./tests/data/clean.jpg') def test_png_lightweight(self): - return shutil.copy('./tests/data/dirty.torrent', './tests/data/clean.png') - p = images.PNGParser('./tests/data/clean.png') - self.assertTrue(p.remove_all()) + with self.assertRaises(ValueError): + p = images.PNGParser('./tests/data/clean.png') os.remove('./tests/data/clean.png') def test_avi(self):