changeset 845:8bf14cf5dd0a

Test case for apps/prss-and-open.py.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 22 Jul 2008 00:00:54 +0200
parents 4e84893a1725
children 92c63c37937b
files viff/test/test_apps.py
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/viff/test/test_apps.py	Mon Jul 21 23:46:32 2008 +0200
+++ b/viff/test/test_apps.py	Tue Jul 22 00:00:54 2008 +0200
@@ -99,3 +99,25 @@
         result = gatherResults([p1, p2, p3])
         result.addCallback(check_outputs)
         return result
+
+    def test_prss_and_open(self):
+        """Test apps/prss-and-open.py."""
+        
+        def check_outputs(outputs):
+            lines = []
+            for o in outputs:
+                for line in o.splitlines():
+                    if line.startswith("bits:"):
+                        lines.append(line)
+                        break
+            self.assertEqual(len(lines), 3)
+            self.assertEqual(lines[0], lines[1])
+            self.assertEqual(lines[1], lines[2])
+
+        p1 = execute('prss-and-open.py', 'player-1.ini')
+        p2 = execute('prss-and-open.py', 'player-2.ini')
+        p3 = execute('prss-and-open.py', 'player-3.ini')
+        
+        result = gatherResults([p1, p2, p3])
+        result.addCallback(check_outputs)
+        return result