Clean WebP tests where `object` variable was used instead of `self`

This commit is contained in:
Fabien LOISON 2021-07-02 16:03:44 +02:00
parent 5362ec8be9
commit 2d6421e1c7
No known key found for this signature in database
GPG Key ID: FF90CA148348048E
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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