commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 42/46: zeromq: fixing up QA code for vlen


From: git
Subject: [Commit-gnuradio] [gnuradio] 42/46: zeromq: fixing up QA code for vlen
Date: Fri, 16 May 2014 19:37:17 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 361a144527287f7c2c9c52d70c6914c182ba5d91
Author: Johnathan Corgan <address@hidden>
Date:   Tue May 13 11:39:15 2014 -0700

    zeromq: fixing up QA code for vlen
---
 gr-zeromq/python/zeromq/qa_zeromq_pub.py      | 14 +++++++-------
 gr-zeromq/python/zeromq/qa_zeromq_pushpull.py | 12 ++++++------
 gr-zeromq/python/zeromq/qa_zeromq_reqrep.py   | 14 +++++++-------
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/gr-zeromq/python/zeromq/qa_zeromq_pub.py 
b/gr-zeromq/python/zeromq/qa_zeromq_pub.py
index 4277cc0..8a4d491 100755
--- a/gr-zeromq/python/zeromq/qa_zeromq_pub.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_pub.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright 202013 Free Software Foundation, Inc.
+# Copyright 2014 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -34,15 +34,15 @@ class qa_zeromq_pub (gr_unittest.TestCase):
         self.tb = None
 
     def test_001 (self):
-        print "test_001"
-        src_data = [1,2,3,4,5,6,7,8,9,0]*100
-        src = blocks.vector_source_f(src_data, False, 1)
-        zeromq_pub_sink = zeromq.pub_sink(gr.sizeof_float, 10 , 
"tcp://127.0.0.1:5555")
+        vlen = 10
+        self.rx_data = None
+        src_data = range(vlen)*100
+        src = blocks.vector_source_f(src_data, False, vlen)
+        zeromq_pub_sink = zeromq.pub_sink(gr.sizeof_float, vlen, 
"tcp://127.0.0.1:5555")
         self.tb.connect(src, zeromq_pub_sink)
         self.probe_manager = zeromq.probe_manager()
         self.probe_manager.add_socket("tcp://127.0.0.1:5555", 'float32', 
self.recv_data)
-        self.tb.run ()
-        print self.rx_data
+        self.tb.run()
         self.assertEqual(self.rx_data, src_data)
 
     def recv_data (self, data):
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py 
b/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
index dd4cb44..56f0cb6 100755
--- a/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
@@ -31,12 +31,12 @@ class qa_zeromq_pushpull (gr_unittest.TestCase):
         self.tb = None
 
     def test_001 (self):
-        print "test_001"
-        src_data = [1,2,3,4,5,6,7,8,9,0]*100
-        src = blocks.vector_source_c(src_data, False, 1)
-        zeromq_push_sink = zeromq.push_sink(gr.sizeof_gr_complex, 10, 
"tcp://127.0.0.1:5555")
-        zeromq_pull_source = zeromq.pull_source(gr.sizeof_gr_complex, 10, 
"tcp://127.0.0.1:5555", 0)
-        sink = blocks.vector_sink_c()
+        vlen = 10
+        src_data = range(vlen)*100
+        src = blocks.vector_source_f(src_data, False, vlen)
+        zeromq_push_sink = zeromq.push_sink(gr.sizeof_float, vlen, 
"tcp://127.0.0.1:5555")
+        zeromq_pull_source = zeromq.pull_source(gr.sizeof_float, vlen, 
"tcp://127.0.0.1:5555", 0)
+        sink = blocks.vector_sink_f(vlen)
         self.tb.connect(src, zeromq_push_sink)
         self.tb.connect(zeromq_pull_source, sink)
         self.tb.run ()
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py 
b/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
index e6d20fc..337f285 100755
--- a/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright 202013 Free Software Foundation, Inc.
+# Copyright 2014 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -34,12 +34,12 @@ class qa_zeromq_reqrep (gr_unittest.TestCase):
         self.tb = None
 
     def test_001 (self):
-        print "test_001"
-        src_data = [1,2,3,4,5,6,7,8,9,0]*100
-        src = blocks.vector_source_c(src_data, False, 1)
-        zeromq_rep_sink = zeromq.rep_sink(gr.sizeof_gr_complex, 10, 
"tcp://127.0.0.1:5555", 0)
-        zeromq_req_source = zeromq.req_source(gr.sizeof_gr_complex, 10, 
"tcp://127.0.0.1:5555", 0)
-        sink = blocks.vector_sink_c()
+        vlen = 10
+        src_data = range(vlen)*100
+        src = blocks.vector_source_f(src_data, False, vlen)
+        zeromq_rep_sink = zeromq.rep_sink(gr.sizeof_float, vlen, 
"tcp://127.0.0.1:5555", 0)
+        zeromq_req_source = zeromq.req_source(gr.sizeof_float, vlen, 
"tcp://127.0.0.1:5555", 0)
+        sink = blocks.vector_sink_f(vlen)
         self.tb.connect(src, zeromq_rep_sink)
         self.tb.connect(zeromq_req_source, sink)
         self.tb.run ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]