Skip to content

Commit fc92f56

Browse files
committed
replace skip_known_bad_test with xfail
1 parent 12cd02b commit fc92f56

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

Tests/helper.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,6 @@ def assert_tuple_approx_equal(actuals, targets, threshold, msg):
165165
assert value, msg + ": " + repr(actuals) + " != " + repr(targets)
166166

167167

168-
def skip_known_bad_test(msg=None):
169-
# Skip if PILLOW_RUN_KNOWN_BAD is not true in the environment.
170-
if not os.environ.get("PILLOW_RUN_KNOWN_BAD", False):
171-
pytest.skip(msg or "Known bad test")
172-
173-
174168
def skip_unless_feature(feature):
175169
reason = "%s not available" % feature
176170
return pytest.mark.skipif(not features.check(feature), reason=reason)

Tests/test_file_palm.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22
import subprocess
33

44
import pytest
5+
56
from PIL import Image
67

7-
from .helper import (
8-
IMCONVERT,
9-
assert_image_equal,
10-
hopper,
11-
imagemagick_available,
12-
skip_known_bad_test,
13-
)
8+
from .helper import IMCONVERT, assert_image_equal, hopper, imagemagick_available
149

1510
_roundtrip = imagemagick_available()
1611

@@ -62,13 +57,13 @@ def test_monochrome(tmp_path):
6257
roundtrip(tmp_path, mode)
6358

6459

60+
@pytest.mark.xfail(reason="Palm P image is wrong")
6561
def test_p_mode(tmp_path):
6662
# Arrange
6763
mode = "P"
6864

6965
# Act / Assert
7066
helper_save_as_palm(tmp_path, mode)
71-
skip_known_bad_test("Palm P image is wrong")
7267
roundtrip(tmp_path, mode)
7368

7469

0 commit comments

Comments
 (0)