Fix various Python import tests.
This commit is contained in:
parent
622b6d6859
commit
211ea2e7ef
4 changed files with 23 additions and 5 deletions
|
@ -37,8 +37,10 @@ class Enchant < Formula
|
|||
end
|
||||
|
||||
def test
|
||||
python do
|
||||
system python, "-c", "import enchant; d=enchant.Dict('en_US'); print(d.suggest('homebrew'))"
|
||||
if build.with? 'python'
|
||||
python do
|
||||
system python, "-c", "import enchant; d=enchant.Dict('en_US'); print(d.suggest('homebrew'))"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -87,7 +87,11 @@ class Fontforge < Formula
|
|||
|
||||
def test
|
||||
system "#{bin}/fontforge", "-version"
|
||||
system python, "-c", "import fontforge"
|
||||
if build.with? 'python'
|
||||
python do
|
||||
system python, "-c", "import fontforge"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def caveats
|
||||
|
|
|
@ -61,4 +61,14 @@ class Libvirt < Formula
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
if build.with? 'python'
|
||||
python do
|
||||
# Testing to import the mod because that is a .so file where linking
|
||||
# can break.
|
||||
system python, '-c', "import libvirtmod"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -49,8 +49,10 @@ class Shiboken < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
python do
|
||||
system python, "-c", "import shiboken"
|
||||
if build.with? 'python'
|
||||
python do
|
||||
system python, "-c", "import shiboken"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue