aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/gst-python.rb
diff options
context:
space:
mode:
authorJack Nagel2013-02-01 23:12:39 -0600
committerJack Nagel2013-02-01 23:38:52 -0600
commit0ccaf6e8125cf887e71cb64d58a486e8157473df (patch)
treeefc544af17a68f665d297428af01904b3b39b46a /Library/Formula/gst-python.rb
parente5b92fe496d5b77bf841317dce302043c919056d (diff)
downloadhomebrew-0ccaf6e8125cf887e71cb64d58a486e8157473df.tar.bz2
gst-python: use test DSL
Diffstat (limited to 'Library/Formula/gst-python.rb')
-rw-r--r--Library/Formula/gst-python.rb50
1 files changed, 24 insertions, 26 deletions
diff --git a/Library/Formula/gst-python.rb b/Library/Formula/gst-python.rb
index 32220075d..4ab1bd3b3 100644
--- a/Library/Formula/gst-python.rb
+++ b/Library/Formula/gst-python.rb
@@ -25,31 +25,29 @@ class GstPython < Formula
"python" + `python -c 'import sys;print(sys.version[:3])'`.strip
end
- def test
- mktemp do
- (Pathname.pwd+'test.py').write <<-EOS.undent
- #!/usr/bin/env python
-
- import time
-
- import pygst
- pygst.require('0.10')
- import gst
-
- import gobject
- gobject.threads_init()
-
- def main():
- pipeline = gst.parse_launch(
- 'audiotestsrc ! audioresample ! fakesink')
- pipeline.set_state(gst.STATE_PLAYING)
- time.sleep(3)
-
- if __name__ == "__main__":
- main()
- EOS
- system "chmod +x test.py"
- system "./test.py"
- end
+ test do
+ (testpath/'test.py').write <<-EOS.undent
+ #!/usr/bin/env python
+
+ import time
+
+ import pygst
+ pygst.require('0.10')
+ import gst
+
+ import gobject
+ gobject.threads_init()
+
+ def main():
+ pipeline = gst.parse_launch(
+ 'audiotestsrc ! audioresample ! fakesink')
+ pipeline.set_state(gst.STATE_PLAYING)
+ time.sleep(3)
+
+ if __name__ == "__main__":
+ main()
+ EOS
+ system "chmod +x test.py"
+ system "./test.py"
end
end