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 end
def test def test
python do if build.with? 'python'
system python, "-c", "import enchant; d=enchant.Dict('en_US'); print(d.suggest('homebrew'))" python do
system python, "-c", "import enchant; d=enchant.Dict('en_US'); print(d.suggest('homebrew'))"
end
end end
end end
end end

View file

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

View file

@ -61,4 +61,14 @@ class Libvirt < Formula
end end
end 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 end

View file

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