mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-03 11:35:52 +03:00
replace skip_known_bad_test with xfail
This commit is contained in:
parent
12cd02bd2d
commit
fc92f56382
|
@ -165,12 +165,6 @@ def assert_tuple_approx_equal(actuals, targets, threshold, msg):
|
||||||
assert value, msg + ": " + repr(actuals) + " != " + repr(targets)
|
assert value, msg + ": " + repr(actuals) + " != " + repr(targets)
|
||||||
|
|
||||||
|
|
||||||
def skip_known_bad_test(msg=None):
|
|
||||||
# Skip if PILLOW_RUN_KNOWN_BAD is not true in the environment.
|
|
||||||
if not os.environ.get("PILLOW_RUN_KNOWN_BAD", False):
|
|
||||||
pytest.skip(msg or "Known bad test")
|
|
||||||
|
|
||||||
|
|
||||||
def skip_unless_feature(feature):
|
def skip_unless_feature(feature):
|
||||||
reason = "%s not available" % feature
|
reason = "%s not available" % feature
|
||||||
return pytest.mark.skipif(not features.check(feature), reason=reason)
|
return pytest.mark.skipif(not features.check(feature), reason=reason)
|
||||||
|
|
|
@ -2,15 +2,10 @@ import os.path
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
from .helper import (
|
from .helper import IMCONVERT, assert_image_equal, hopper, imagemagick_available
|
||||||
IMCONVERT,
|
|
||||||
assert_image_equal,
|
|
||||||
hopper,
|
|
||||||
imagemagick_available,
|
|
||||||
skip_known_bad_test,
|
|
||||||
)
|
|
||||||
|
|
||||||
_roundtrip = imagemagick_available()
|
_roundtrip = imagemagick_available()
|
||||||
|
|
||||||
|
@ -62,13 +57,13 @@ def test_monochrome(tmp_path):
|
||||||
roundtrip(tmp_path, mode)
|
roundtrip(tmp_path, mode)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(reason="Palm P image is wrong")
|
||||||
def test_p_mode(tmp_path):
|
def test_p_mode(tmp_path):
|
||||||
# Arrange
|
# Arrange
|
||||||
mode = "P"
|
mode = "P"
|
||||||
|
|
||||||
# Act / Assert
|
# Act / Assert
|
||||||
helper_save_as_palm(tmp_path, mode)
|
helper_save_as_palm(tmp_path, mode)
|
||||||
skip_known_bad_test("Palm P image is wrong")
|
|
||||||
roundtrip(tmp_path, mode)
|
roundtrip(tmp_path, mode)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user