Simplify skipping

This commit is contained in:
Hugo 2018-10-21 17:47:35 +03:00
parent e33812c56c
commit 06ad343d35

View File

@ -5,19 +5,12 @@ from PIL import __version__
try:
import pyroma
except ImportError:
# Skip via setUp()
pass
pyroma = None
class TestPyroma(PillowTestCase):
def setUp(self):
try:
import pyroma
assert pyroma # Ignore warning
except ImportError:
self.skipTest("ImportError")
@unittest.skipUnless(pyroma, "Pyroma is not installed")
def test_pyroma(self):
# Arrange
data = pyroma.projectdata.get_data(".")