From 2d6421e1c75a0452c82bbded3b2277e8388e9034 Mon Sep 17 00:00:00 2001 From: Fabien LOISON Date: Fri, 2 Jul 2021 16:03:44 +0200 Subject: [PATCH] Clean WebP tests where `object` variable was used instead of `self` --- test/test_image_encoders_webp.py | 8 ++++---- test/test_image_encoders_webp_lossless.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/test_image_encoders_webp.py b/test/test_image_encoders_webp.py index db96b72..5cf4f8f 100644 --- a/test/test_image_encoders_webp.py +++ b/test/test_image_encoders_webp.py @@ -17,7 +17,7 @@ class Test_get_riff_structure(object): def webp_image(self): return open("test/images/alpha.lossless.metadata.webp", "rb").read() - def test_riff_structure(object, webp_image): + def test_riff_structure(self, webp_image): riff = webp.get_riff_structure(webp_image) assert riff["formtype"] == "WEBP" assert riff["size"] == 11868 @@ -94,15 +94,15 @@ class Test_get_vp8x_info(object): class Test_is_lossy_webp(object): - def test_with_lossy_webp(object): + def test_with_lossy_webp(self): image_bytes = open("test/images/alpha.lossy.webp", "rb").read() assert webp.is_lossy_webp(image_bytes) is True - def test_with_lossless_webp(object): + def test_with_lossless_webp(self): image_bytes = open("test/images/alpha.lossless.webp", "rb").read() assert webp.is_lossy_webp(image_bytes) is False - def test_with_png(object): + def test_with_png(self): image_bytes = open("test/images/alpha.png", "rb").read() assert webp.is_lossy_webp(image_bytes) is False diff --git a/test/test_image_encoders_webp_lossless.py b/test/test_image_encoders_webp_lossless.py index 5f245c1..83b457d 100644 --- a/test/test_image_encoders_webp_lossless.py +++ b/test/test_image_encoders_webp_lossless.py @@ -6,15 +6,15 @@ from yoga.image.encoders import webp_lossless class Test_is_lossless_webp(object): - def test_with_lossy_webp(object): + def test_with_lossy_webp(self): image_bytes = open("test/images/alpha.lossy.webp", "rb").read() assert webp_lossless.is_lossless_webp(image_bytes) is False - def test_with_lossless_webp(object): + def test_with_lossless_webp(self): image_bytes = open("test/images/alpha.lossless.webp", "rb").read() assert webp_lossless.is_lossless_webp(image_bytes) is True - def test_with_png(object): + def test_with_png(self): image_bytes = open("test/images/alpha.png", "rb").read() assert webp_lossless.is_lossless_webp(image_bytes) is False