From 06ad343d3586268572ee3f86c176a1870f677c42 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 21 Oct 2018 17:47:35 +0300 Subject: [PATCH] Simplify skipping --- Tests/test_pyroma.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Tests/test_pyroma.py b/Tests/test_pyroma.py index cf5fc361f..e147161a7 100644 --- a/Tests/test_pyroma.py +++ b/Tests/test_pyroma.py @@ -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(".")