Fix various Python import tests.

This commit is contained in:
Mike McQuaid 2013-09-02 22:32:02 +01:00
parent 622b6d6859
commit 211ea2e7ef
4 changed files with 23 additions and 5 deletions

View file

@ -37,8 +37,10 @@ class Enchant < Formula
end
def test
if build.with? 'python'
python do
system python, "-c", "import enchant; d=enchant.Dict('en_US'); print(d.suggest('homebrew'))"
end
end
end
end

View file

@ -87,8 +87,12 @@ class Fontforge < Formula
def test
system "#{bin}/fontforge", "-version"
if build.with? 'python'
python do
system python, "-c", "import fontforge"
end
end
end
def caveats
x_caveats = <<-EOS.undent

View file

@ -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

View file

@ -49,8 +49,10 @@ class Shiboken < Formula
end
test do
if build.with? 'python'
python do
system python, "-c", "import shiboken"
end
end
end
end