mirror of https://github.com/wanadev/yoga.git
Clean WebP tests where `object` variable was used instead of `self`
This commit is contained in:
parent
5362ec8be9
commit
2d6421e1c7
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue