[telepathy-gabble/master] factor test_dialects() out of test_all_dialects()
Dafydd Harries
daf at rhydd.org
Tue Apr 7 09:13:17 PDT 2009
---
tests/twisted/jingle/jingletest2.py | 23 ++++++++---------------
1 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/tests/twisted/jingle/jingletest2.py b/tests/twisted/jingle/jingletest2.py
index b1482c8..4fc0901 100644
--- a/tests/twisted/jingle/jingletest2.py
+++ b/tests/twisted/jingle/jingletest2.py
@@ -455,20 +455,13 @@ class JingleTest2:
in enumerate(self.remote_transports) ],
signature='(usuussduss)')
-def test_all_dialects(f):
- def test015(q, bus, conn, stream):
- f(JingleProtocol015(), q, bus, conn, stream)
-
- def test031(q, bus, conn, stream):
- f(JingleProtocol031(),q, bus, conn, stream)
+def test_dialects(f, dialects):
+ for dialect in dialects:
+ exec_test(
+ lambda q, bus, conn, stream: f(dialect(), q, bus, conn, stream))
- def testg3(q, bus, conn, stream):
- f(GtalkProtocol03(), q, bus, conn, stream)
-
- def testg4(q, bus, conn, stream):
- f(GtalkProtocol04(), q, bus, conn, stream)
+def test_all_dialects(f):
+ test_dialects(f, [
+ JingleProtocol015, JingleProtocol031, GtalkProtocol03,
+ GtalkProtocol04])
- exec_test(testg3)
- exec_test(testg4)
- exec_test(test015)
- exec_test(test031)
--
1.5.6.5
More information about the telepathy-commits
mailing list