mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
Use pytest to skip tests
This commit is contained in:
parent
7028de7509
commit
7859f81828
|
@ -3,7 +3,6 @@ import distutils.version
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import unittest
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
@ -441,7 +440,7 @@ class TestImageFont(PillowTestCase):
|
||||||
with pytest.raises(UnicodeEncodeError):
|
with pytest.raises(UnicodeEncodeError):
|
||||||
font.getsize("’")
|
font.getsize("’")
|
||||||
|
|
||||||
@unittest.skipIf(is_pypy(), "failing on PyPy")
|
@pytest.mark.skipif(is_pypy(), reason="failing on PyPy")
|
||||||
def test_unicode_extended(self):
|
def test_unicode_extended(self):
|
||||||
# issue #3777
|
# issue #3777
|
||||||
text = "A\u278A\U0001F12B"
|
text = "A\u278A\U0001F12B"
|
||||||
|
@ -478,7 +477,7 @@ class TestImageFont(PillowTestCase):
|
||||||
name = font.getname()
|
name = font.getname()
|
||||||
assert ("FreeMono", "Regular") == name
|
assert ("FreeMono", "Regular") == name
|
||||||
|
|
||||||
@unittest.skipIf(is_win32(), "requires Unix or macOS")
|
@pytest.mark.skipif(is_win32(), reason="requires Unix or macOS")
|
||||||
def test_find_linux_font(self):
|
def test_find_linux_font(self):
|
||||||
# A lot of mocking here - this is more for hitting code and
|
# A lot of mocking here - this is more for hitting code and
|
||||||
# catching syntax like errors
|
# catching syntax like errors
|
||||||
|
@ -523,7 +522,7 @@ class TestImageFont(PillowTestCase):
|
||||||
font_directory + "/Duplicate.ttf", "Duplicate"
|
font_directory + "/Duplicate.ttf", "Duplicate"
|
||||||
)
|
)
|
||||||
|
|
||||||
@unittest.skipIf(is_win32(), "requires Unix or macOS")
|
@pytest.mark.skipif(is_win32(), reason="requires Unix or macOS")
|
||||||
def test_find_macos_font(self):
|
def test_find_macos_font(self):
|
||||||
# Like the linux test, more cover hitting code rather than testing
|
# Like the linux test, more cover hitting code rather than testing
|
||||||
# correctness.
|
# correctness.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user