aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/shiboken.rb
diff options
context:
space:
mode:
authorSamuel John2013-06-13 15:52:23 +0200
committerSamuel John2013-09-05 15:26:57 +0200
commitfd03aa527d1a4a44f202a9841b6b4e05ee6065b6 (patch)
treed92c005f499a500f016647f2f0a8a8001240282d /Library/Formula/shiboken.rb
parentc54f879fbf53c7742d252c2534868538488a2fa9 (diff)
downloadhomebrew-fd03aa527d1a4a44f202a9841b6b4e05ee6065b6.tar.bz2
Improve python tests for brew bots
Allow `build.with?` and similar methods to be used during the test phase. The BuildOptions (`build`) are initialized with the `Tab.used_options` unless explicitly overwritten on the command line. So basically `build.with?` works in `def install` and in `test do` as one would naively expect. (For the test, gramatically it should be `built.with?` but who cares) If a formula was installed `--with-python`, now the tests are also run `--with-python`. This enables us to use the `python do ... end` in a meaningful manner. Using `python do ... end` blocks for the tests, because the bot.brew.sh has system python per default and we need to set the PYTHONPATH for the test. Potentially to different values for Python 2.x and 3.x.
Diffstat (limited to 'Library/Formula/shiboken.rb')
-rw-r--r--Library/Formula/shiboken.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/Library/Formula/shiboken.rb b/Library/Formula/shiboken.rb
index fe01e19b9..171a666a2 100644
--- a/Library/Formula/shiboken.rb
+++ b/Library/Formula/shiboken.rb
@@ -49,10 +49,8 @@ class Shiboken < Formula
end
test do
- if build.with? 'python'
- python do
- system python, "-c", "import shiboken"
- end
+ python do
+ system python, "-c", "import shiboken"
end
end
end