mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Skip: CFFI imports pycparser which doesn't support PYTHONOPTIMIZE=2
This commit is contained in:
parent
4218a769d7
commit
663b06e223
|
@ -1,16 +1,21 @@
|
|||
from helper import unittest, PillowTestCase, hopper, on_appveyor
|
||||
|
||||
try:
|
||||
from PIL import PyAccess
|
||||
import cffi
|
||||
except ImportError:
|
||||
cffi = None
|
||||
pass
|
||||
|
||||
from PIL import Image
|
||||
import sys
|
||||
import os
|
||||
|
||||
# CFFI imports pycparser which doesn't support PYTHONOPTIMIZE=2
|
||||
# https://github.com/eliben/pycparser/pull/198#issuecomment-317001670
|
||||
if os.environ.get("PYTHONOPTIMIZE") == "2":
|
||||
cffi = None
|
||||
else:
|
||||
try:
|
||||
from PIL import PyAccess
|
||||
import cffi
|
||||
except ImportError:
|
||||
cffi = None
|
||||
pass
|
||||
|
||||
|
||||
class AccessTest(PillowTestCase):
|
||||
# initial value
|
||||
|
|
Loading…
Reference in New Issue
Block a user