mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Merge pull request #420 from wiredfool/gs-test
Skip ghostscript test when gs is missing
This commit is contained in:
commit
6a52e272cf
|
@ -1,6 +1,20 @@
|
||||||
from tester import *
|
from tester import *
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image, EpsImagePlugin
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if EpsImagePlugin.gs_windows_binary == False:
|
||||||
|
# already checked. Not there.
|
||||||
|
skip()
|
||||||
|
|
||||||
|
if not sys.platform.startswith('win'):
|
||||||
|
import subprocess
|
||||||
|
try:
|
||||||
|
gs = subprocess.Popen(['gs','--version'], stdout=subprocess.PIPE)
|
||||||
|
gs.stdout.read()
|
||||||
|
except OSError:
|
||||||
|
# no ghostscript
|
||||||
|
skip()
|
||||||
|
|
||||||
#Our two EPS test files (they are identical except for their bounding boxes)
|
#Our two EPS test files (they are identical except for their bounding boxes)
|
||||||
file1 = "Tests/images/zero_bb.eps"
|
file1 = "Tests/images/zero_bb.eps"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user