Skip failing QPixmap/QT5 tests on Arch

This commit is contained in:
Eric Soroos 2017-02-20 08:49:44 -08:00
parent 9b82bdbb10
commit 1b94ff81fe
3 changed files with 12 additions and 3 deletions

View File

@ -253,6 +253,12 @@ if sys.platform == 'win32':
else:
IMCONVERT = 'convert'
def distro():
if os.path.exists('/etc/os-release'):
with open('/etc/os-release', 'r') as f:
for line in f:
if 'ID=' in line:
return line.strip().split('=')[1]
class cached_property(object):
def __init__(self, func):

View File

@ -1,9 +1,10 @@
from helper import unittest, PillowTestCase, hopper
from helper import unittest, PillowTestCase, hopper, distro
from test_imageqt import PillowQtTestCase, PillowQPixmapTestCase
from PIL import ImageQt
@unittest.skipIf(ImageQt.qt_version == '5' and distro() == 'arch',
"Topixmap fails on Arch + QT5")
class TestFromQPixmap(PillowQPixmapTestCase, PillowTestCase):
def roundtrip(self, expected):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, hopper
from helper import unittest, PillowTestCase, hopper, distro
from test_imageqt import PillowQtTestCase, PillowQPixmapTestCase
from PIL import ImageQt
@ -9,6 +9,8 @@ if ImageQt.qt_is_installed:
class TestToQPixmap(PillowQPixmapTestCase, PillowTestCase):
@unittest.skipIf(ImageQt.qt_version == '5' and distro() == 'arch',
"Topixmap fails on Arch + QT5")
def test_sanity(self):
PillowQtTestCase.setUp(self)