mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Simplify skipping
This commit is contained in:
parent
e33812c56c
commit
06ad343d35
|
@ -5,19 +5,12 @@ from PIL import __version__
|
||||||
try:
|
try:
|
||||||
import pyroma
|
import pyroma
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# Skip via setUp()
|
pyroma = None
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class TestPyroma(PillowTestCase):
|
class TestPyroma(PillowTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
@unittest.skipUnless(pyroma, "Pyroma is not installed")
|
||||||
try:
|
|
||||||
import pyroma
|
|
||||||
assert pyroma # Ignore warning
|
|
||||||
except ImportError:
|
|
||||||
self.skipTest("ImportError")
|
|
||||||
|
|
||||||
def test_pyroma(self):
|
def test_pyroma(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
data = pyroma.projectdata.get_data(".")
|
data = pyroma.projectdata.get_data(".")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user