mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
use xfail for failing tests
This commit is contained in:
parent
dd4b61c83c
commit
12cd02bd2d
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
python -m pytest -v -x -W always --cov PIL --cov Tests --cov-report term Tests
|
||||
python -m pytest -v -x -ra -W always --cov PIL --cov Tests --cov-report term Tests
|
||||
|
||||
# Docs
|
||||
if [ "$TRAVIS_PYTHON_VERSION" == "3.8" ] && [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then
|
||||
|
|
2
.github/workflows/test-windows.yml
vendored
2
.github/workflows/test-windows.yml
vendored
|
@ -113,7 +113,7 @@ jobs:
|
|||
- name: Test Pillow
|
||||
run: |
|
||||
path %GITHUB_WORKSPACE%\\winbuild\\build\\bin;%PATH%
|
||||
python.exe -m pytest -vx -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests
|
||||
python.exe -m pytest -vxra -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests
|
||||
shell: cmd
|
||||
|
||||
- name: Prepare to upload errors
|
||||
|
|
|
@ -218,7 +218,7 @@ class TestImagingCoreResampleAccuracy:
|
|||
assert_image_equal(im, ref)
|
||||
|
||||
|
||||
class CoreResampleConsistencyTest:
|
||||
class TestCoreResampleConsistency:
|
||||
def make_case(self, mode, fill):
|
||||
im = Image.new(mode, (512, 9), fill)
|
||||
return im.resize((9, 512), Image.LANCZOS), im.load()[0, 0]
|
||||
|
@ -253,7 +253,7 @@ class CoreResampleConsistencyTest:
|
|||
self.run_case(self.make_case("F", 1.192093e-07))
|
||||
|
||||
|
||||
class CoreResampleAlphaCorrectTest:
|
||||
class TestCoreResampleAlphaCorrect:
|
||||
def make_levels_case(self, mode):
|
||||
i = Image.new(mode, (256, 16))
|
||||
px = i.load()
|
||||
|
@ -274,7 +274,7 @@ class CoreResampleAlphaCorrectTest:
|
|||
len(used_colors), y
|
||||
)
|
||||
|
||||
@pytest.mark.skip("Current implementation isn't precise enough")
|
||||
@pytest.mark.xfail(reason="Current implementation isn't precise enough")
|
||||
def test_levels_rgba(self):
|
||||
case = self.make_levels_case("RGBA")
|
||||
self.run_levels_case(case.resize((512, 32), Image.BOX))
|
||||
|
@ -283,7 +283,7 @@ class CoreResampleAlphaCorrectTest:
|
|||
self.run_levels_case(case.resize((512, 32), Image.BICUBIC))
|
||||
self.run_levels_case(case.resize((512, 32), Image.LANCZOS))
|
||||
|
||||
@pytest.mark.skip("Current implementation isn't precise enough")
|
||||
@pytest.mark.xfail(reason="Current implementation isn't precise enough")
|
||||
def test_levels_la(self):
|
||||
case = self.make_levels_case("LA")
|
||||
self.run_levels_case(case.resize((512, 32), Image.BOX))
|
||||
|
@ -329,7 +329,7 @@ class CoreResampleAlphaCorrectTest:
|
|||
self.run_dirty_case(case.resize((20, 20), Image.LANCZOS), (255,))
|
||||
|
||||
|
||||
class CoreResamplePassesTest:
|
||||
class TestCoreResamplePasses:
|
||||
@contextmanager
|
||||
def count(self, diff):
|
||||
count = Image.core.get_stats()["new_count"]
|
||||
|
@ -372,7 +372,7 @@ class CoreResamplePassesTest:
|
|||
assert_image_similar(with_box, cropped, 0.1)
|
||||
|
||||
|
||||
class CoreResampleCoefficientsTest:
|
||||
class TestCoreResampleCoefficients:
|
||||
def test_reduce(self):
|
||||
test_color = 254
|
||||
|
||||
|
@ -401,7 +401,7 @@ class CoreResampleCoefficientsTest:
|
|||
assert histogram[0x100 * 3 + 0xFF] == 0x10000
|
||||
|
||||
|
||||
class CoreResampleBoxTest:
|
||||
class TestCoreResampleBox:
|
||||
def test_wrong_arguments(self):
|
||||
im = hopper()
|
||||
for resample in (
|
||||
|
|
|
@ -443,7 +443,7 @@ class TestImageFont:
|
|||
with pytest.raises(UnicodeEncodeError):
|
||||
font.getsize("’")
|
||||
|
||||
@pytest.mark.skipif(is_pypy(), reason="failing on PyPy")
|
||||
@pytest.mark.xfail(is_pypy(), reason="failing on PyPy with Raqm")
|
||||
def test_unicode_extended(self):
|
||||
# issue #3777
|
||||
text = "A\u278A\U0001F12B"
|
||||
|
|
Loading…
Reference in New Issue
Block a user